General discussion

Locked

MDI Form in VB

By andiexxx ·
I wanna displaying MDI child in MDI Form in the center of the app. I tried in MDI child properties StartUpPosition to CenterOwner or CenterScreen and it said "Invalid property value"

Anyone could help me,pls?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

MDI Form in VB

by Hery In reply to MDI Form in VB

Try this

Private sub Form_Load()
Me.Left = MDIForm1.Scalewidth / 2 - Me.Width / 2
Me.Top = MDIForm1.ScaleHeight / 2 - Me.Height / 2
End Sub

Collapse -

MDI Form in VB

by andiexxx In reply to MDI Form in VB

The question was auto-closed by TechRepublic

Collapse -

MDI Form in VB

by francodacosta In reply to MDI Form in VB

use the following code in the form resize event.

me.move (mdiform1.scalewidth - me.width)/2, (mdiform1.scaleheight - me.height)/2

This code is faster than using the form's Top and Left properties

Collapse -

MDI Form in VB

by andiexxx In reply to MDI Form in VB

The question was auto-closed by TechRepublic

Collapse -

MDI Form in VB

by andiexxx In reply to MDI Form in VB

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums