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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI Forms

Status
Not open for further replies.

DTJeff

Programmer
Dec 9, 2003
37
GB
Hi all.

I'm having a problem with MDI forms.

I declare my forms at module level (so I can access them from anywhere in the app), and display one as soon as the app starts up (in the form_load sub) so that it appears on the left of the MDIParent (it is used as an "outlook" style icon menu). That works fine.

the problem starts when I open another form to be displayed to the right in the empty space to the rigth of the icon menu. It sort of "flickers" before it finally redraws. The flickering is simply the form being drawn with the title bar etc before it then removes this (as its not supposed to have them) and then repositions - any ideas how to stop this? I did the exact same thing in VB6 without any problems.

The code I'm using to open the form is:

Code:
frmAssets.MdiParent = frmAppHolder
frmAssets.Location = New Point(frmleftmenu.left + frmleftmenu.width, 0)
frmAssets.Size = New Size(50, 50)
frmAssets.Show()

frmAppholder is the MDIParent, frmLeftMenu is the left hand icon bar (docked to the left of the MDIParent), and frmAssets is the form i'm trying to display in the "empty space" to the right of frmLeftMenu.

(hope all that makes sense!)

Any help much appreciated.

Jeff.
 
oops - sorry. The:

Code:
frmassets.size=new size(50,50)

would normally have the size required to fill the gap rather then 50, 50.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top