This is a migrated thread and some comments may be shown as answers.

Icon for docked form

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
bhogavalli
Top achievements
Rank 1
bhogavalli asked on 02 Nov 2010, 10:31 AM
Hi team,

I have normal windows form which is docked using raddock.
I need to set an icon on the tab of the form.

Thanks
Suresh.

1 Answer, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 02 Nov 2010, 12:19 PM
Hi, 

If you want to set an icon on the tab of a DockWindow when using RadDock and adding in forms as MDI Children, then this should work for you. (this is using the current latest release of Q2 2010 914)

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
    ' Has a distinct icon
    Dim form As New RadForm1()
    form.MdiParent = Me
    form.Show()
 
    ' Also has a distinct icon
    Dim form2 As New RadForm2()
    form2.MdiParent = Me
    form2.Show()
End Sub
 
Private Sub RadDock1_DockWindowAdded(ByVal sender As System.Object, _
    ByVal e As Telerik.WinControls.UI.Docking.DockWindowEventArgs) Handles RadDock1.DockWindowAdded
 
    Dim formIcon As New Icon(DirectCast(e.DockWindow.ActiveControl, Telerik.WinControls.UI.RadForm).Icon, 16, 16)
    e.DockWindow.Image = formIcon.ToBitmap()
End Sub

Hope that helps
Richard
Tags
General Discussions
Asked by
bhogavalli
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Share this question
or