Link to home
Start Free TrialLog in
Avatar of f_asmaa
f_asmaa

asked on

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?
Avatar of mmarinov
mmarinov

Hi f_asmaa,

you have to use

IsMDIContainer = True
FormBorderStyle = FormBorderStyle.None

and it works as a charm

Regards!
B..M
Avatar of f_asmaa

ASKER

Yes, These properties are sat but I still have 2 pixels border. Please check
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
Avatar of f_asmaa

ASKER

OK, how to remove this border? Have you direct solution?
f_asmaa,

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

B..M
Avatar of f_asmaa

ASKER

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.
f_asmaa,

i see, good luck    

B..M
ASKER CERTIFIED SOLUTION
Avatar of names
names

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial