Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximizing Child-Forms

Status
Not open for further replies.

Flupke

Programmer
Jun 26, 2002
94
BE
Hello everyone,

Firstof all, my very best wishes to all of you.

In a project with a MDI-form and several child-forms, the Windowstate of both MDI-form and child-forms is set to Maximized.
However, the first time I open a child-form, it is never displayed Maximized. The second and third are Maximized. It does not matter which of the three forms I open first; it is always the first that is not Maximized.

My code for opening the child-form is as follows:

Private fVerkoopschermTickets As frmVerkoopschermTickets

If IsNothing(fVerkoopschermTickets) OrElse fVerkoopschermTickets.IsDisposed Then
fVerkoopschermTickets = New frmVerkoopschermTickets
fVerkoopschermTickets.MdiParent = Me
fVerkoopschermTickets.Show()
Else
fVerkoopschermShop.BringToFront()
End If

Also, if I add to the code

frmVerkoopschermTickets.WindowState = FormWindowState.Maximized

or

fVerkoopschermTickets.WindowState = FormWindowState.Maximized

it does not have any result.

Does anyone have any idea?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel
 
Where in the code are you putting the Maximize code?

Have you tried setting the child forms' Maximized property to True at design time, in the Properties window?


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Hello,

The Windowstate property is set to Maximized in the Properties window.

Additionally, I use the code
fVerkoopschermTickets.WindowState = FormWindowState.Maximized
after the fVerkoopschermTickets.Show() or the fVerkoopschermTickets.BringToFront()

If IsNothing(fVerkoopschermTickets) OrElse fVerkoopschermTickets.IsDisposed Then
fVerkoopschermTickets = New frmVerkoopschermTickets
fVerkoopschermTickets.MdiParent = Me
fVerkoopschermTickets.Show()
Else
fVerkoopschermShop.BringToFront()
End If

fVerkoopschermTickets.WindowState = FormWindowState.Maximized


Thank you for your help,

Michel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top