1,105,375 Community Members

VB.net hide MDI Child title bar

Member Avatar
sanket044
Light Poster
45 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hey,
i am creating one project where i am using MDI system,
so when i am opoening MDICHild in MDI Parent it adds new title bar for MDI child.

I tried formborderstyle, have hide controlbox, max - min button but it dident worked ?

so can anyone have any solution ???

Thank You....

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
0
 

I must be a wizard!

I set the form border style to none and then set the form to maximize on form load.

Works like a charm for me.

Do you have any special form drawing code?

Member Avatar
sanket044
Light Poster
45 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Ya i have one function which dynamically creates form design. So when i use opacity nd maximize in load event it first executes that function nd then meximizes somethime it didnt maximize..
I mean its working like 50 50.

Member Avatar
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418 [?]
Q&As Helped to Solve: 152 [?]
Skill Endorsements: 16 [?]
 
0
 

Have you some how set the MaximumSize property to something other than Size.Empty?

Member Avatar
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418 [?]
Q&As Helped to Solve: 152 [?]
Skill Endorsements: 16 [?]
 
2
 

I just had another thought, try moving your maximize code from the Load handler to the Shown handler.

Member Avatar
tinstaafl
Postaholic
2,012 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 402 [?]
Skill Endorsements: 35 [?]
 
0
 

Here's another thought a dialog form without a control box and no text has no title bar. enable autosize, autosizemode growandshrink, windowstate maximized, and size equal to the MDIParent.size, and the form will show maximized inside the parent, with no title bar, and will autosize with the parent. Since you want to create it dynamically, designing it in the VS designer then copying the code from the designer file, should give you everything you need.

Member Avatar
sanket044
Light Poster
45 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

i used following code

with me
    .windowState = maximized
    .formBorderStyle = nonw
end with
dis()


function dis()
    msgbox("hello")
    return vbNull
end function

But it executes first function then it is getting maximized...
What to do? My function depends on size, i want to maximized first then function call.

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
0
 

Have you tried setting the form properties in designer mode instead?

Just for S's & G's?

Member Avatar
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418 [?]
Q&As Helped to Solve: 152 [?]
Skill Endorsements: 16 [?]
 
2
 

I am beginning to suspect that the issue is the MDI taskbar that shows up when you maximize a child form. I have attached a simple project for you to play with.

MDI1

Attachments MDI_Borders.zip (15.29KB)
Member Avatar
tinstaafl
Postaholic
2,012 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 402 [?]
Skill Endorsements: 35 [?]
 
1
 

But it executes first function then it is getting maximized...

if your code is in the load handler for the MDIParent the form won't show until the handler is finished. try adding Me.Show before you call the sub.

Member Avatar
sanket044
Light Poster
45 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

What is S's & G's? ?? @bigginerdev

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
0
 

I prefer to keep the forum G rated.

You will have to use your imagination. :)

For S***'s and giggles.

Question Answered as of 1 Year Ago by Begginnerdev, TnTinMN and tinstaafl
Member Avatar
sanket044
Light Poster
45 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Yes i got it... Thank you all guyes..
I just moved code to me.shown from me.load...

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: