MDI skinning question
-
Hey guys, I've tried looking everywhere and I can't seem to find a solution. Basically, I want to change the inside "box" of an MDI parent form (where an MDIChild can go) and round the corners there. I tried drawing a "border" around the MDIChild and forms, I also thought I could set the background colour to transparent of the MDI Parent, though this didn't work. If someone could point me in the right direction or let me know it cannot be done, that would be great. Thanks, Daniel
-
Hey guys, I've tried looking everywhere and I can't seem to find a solution. Basically, I want to change the inside "box" of an MDI parent form (where an MDIChild can go) and round the corners there. I tried drawing a "border" around the MDIChild and forms, I also thought I could set the background colour to transparent of the MDI Parent, though this didn't work. If someone could point me in the right direction or let me know it cannot be done, that would be great. Thanks, Daniel
Hi Daniel, I'm not sure it is possible to achieve what it is you are trying do, but I do have a bit of past experience with MDI forms. I originally wrote an application where I wanted to change the backround image of the MDI form. This is not possible by setting the forms "BackgroundImage" property. I found that the MDI form has a control on it that handles all the displaying of child forms. It is this control that I had to alter the background image property of. Below is a snippet of code I used to achieve this, perhaps you can manipulate the MDI form control in a similar fashion to what I did to achieve your rounded corners:
For Each Mdi\_display As Control In Me.Controls If TypeOf (Mdi\_display) Is MdiClient Then ' Set colour to white Mdi\_display.BackColor = Color.White ' Centre the image Mdi\_display.BackgroundImageLayout = ImageLayout.Center ' Set background image Mdi\_display.BackgroundImage = My.Resources.Main\_background Mdi\_display.Refresh() ' All done! Exit For End If Next
Regards,
Martin
-
Hi Daniel, I'm not sure it is possible to achieve what it is you are trying do, but I do have a bit of past experience with MDI forms. I originally wrote an application where I wanted to change the backround image of the MDI form. This is not possible by setting the forms "BackgroundImage" property. I found that the MDI form has a control on it that handles all the displaying of child forms. It is this control that I had to alter the background image property of. Below is a snippet of code I used to achieve this, perhaps you can manipulate the MDI form control in a similar fashion to what I did to achieve your rounded corners:
For Each Mdi\_display As Control In Me.Controls If TypeOf (Mdi\_display) Is MdiClient Then ' Set colour to white Mdi\_display.BackColor = Color.White ' Centre the image Mdi\_display.BackgroundImageLayout = ImageLayout.Center ' Set background image Mdi\_display.BackgroundImage = My.Resources.Main\_background Mdi\_display.Refresh() ' All done! Exit For End If Next
Regards,
Martin