MDI Child drawn in wrong loc

B

Bill

When I initially draw my MDI child form at location 0,0 it
appears fine.

If I hide the window via
(Set Visible to false & SendToBack())
then redisplay it
(Set Visible to True & BringToFront()),
the Window is diplayed 44 pixels off at location (44,44)

If I repeat this, the window is displayed at (88,88). How
is this possible? NOTE: I do not see any other child
windows obscuring it. Any thoughts?

-Bill
 
I

Ian Cooper

Hi Bill,
If I hide the window via
(Set Visible to false & SendToBack())
then redisplay it
(Set Visible to True & BringToFront()),
the Window is diplayed 44 pixels off at location (44,44)

Is there any reason you ar not using the Hide() method - which admittedly just sets Visible to false, and the Show() method -which sets visible to true? As a corollary, why do you need to change the z-order of the window with SendToBack and BringToFront?
Ian Cooper
wwww.dnug.org.uk
 
B

Bill

Hi Ian,

I have multiple MDIchild forms - all the same size, all at
location (0,0) respective to the MDIparent.

Just for convenience I use SendToBack()/BringToFront().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top