How can I change background color of toolbar and MDI form?
-
Dear guys How can I change background color of toolbar and MDI form? Thanks in advance. Mahbub8957
-
Dear guys How can I change background color of toolbar and MDI form? Thanks in advance. Mahbub8957
To change Background color of MdI form Do not set isMDIcontainer property of the MDI form to true. Add the following code. Private Sub test_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mdiClient1 As MdiClient = New System.Windows.Forms.MdiClient mdiClient1.Dock = System.Windows.Forms.DockStyle.Fill mdiClient1.Name = "mdiClient1" mdiClient1.BackColor = Color.DarkCyan Me.Controls.AddRange(New System.Windows.Forms.Control() {mdiClient1}) Me.IsMdiContainer = True Dim frm As Form1 = New Form1 frm.MdiParent = Me frm.Show() End Sub this should work for mdi form. How to change the background color of a toolbar: 1.Place a panel on your form 2.Set the panel's docked property to Top (the default for a toolbar) 3.Set the panels backcolor to the color that you want the toolbar to be 4.Place a toolbar on the panel mentioned above The Toolbar & its buttons inherit their backcolor from their parent control. Seems simple enough. You could always 'subclass the toolbar and do the drawing yourself' but for a newbie to VB simple is best.