MDI parent border

In VB.NET I set the property
IsMDIParent=true
FormBorderStyle=none
But the Form still has 2 pixels border. How can I remove it?
f_asmaaAsked:
Who is Participating?
 
namesConnect With a Mentor Commented:
try Me.DockPadding.All = -2
0
 
mmarinovCommented:
Hi f_asmaa,

you have to use

IsMDIContainer = True
FormBorderStyle = FormBorderStyle.None

and it works as a charm

Regards!
B..M
0
 
f_asmaaAuthor Commented:
Yes, These properties are sat but I still have 2 pixels border. Please check
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
mmarinovCommented:
f_asmaa,

set to the form a mainmenu control, keep these settings and start the application - you will see that over the menu control there is no border. the border you see is not on the form but inside it

B..M
0
 
f_asmaaAuthor Commented:
OK, how to remove this border? Have you direct solution?
0
 
mmarinovCommented:
f_asmaa,

as i know you can not remove it if the form is mdicontainer, sorry

B..M
0
 
f_asmaaAuthor Commented:
Don't worry

In order to hide this border. I set the left=-2 and top=-2, I also increased the size by 4 pixels for both width and height. (That is because I need to display a picture as background). But I faced another problem, the MDI parent form size increases more than required if you set th left and top to negative values, that causes the background picture to partially repeat itself. Anyway I found a solution for his problem but I want to report this as a bug.
0
 
mmarinovCommented:
f_asmaa,

i see, good luck    

B..M
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.