MDI Form Strange Behaviour

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

I have a MDI application with Child windows... On one specfic child window
if I click a Toolbar (part of the child window), I launch a Window that will
be child of the MDI and it comes up maxmized.. After the window opens.. I
get a double Control box, 2 sets of MAX,MIN and Close button. Anybody see
this before.. I don't do any thing special... just .Show() and have set the
Maxmimized property set to true.

Thanks
VJ
 
Hi VJ,

Very strange; never saw that. Is it possible that the child you are
creating is a child and grandchild at the same time, and thus the double
controls?

HTH,

Bernie Yaeger
 
Hi..

Yea you are right.. there is a additional instance of the First child. But I
don't see it in instance or as a object. It just happens only for the first
time button click, if I close all windows & repeat the process there are no
duplicate controls. But, if Shutdown the application and start again, it
happens for the first click

How do I solve it?

VJ
 
Hi VJ,

You might want to try setting the form to visible = false, opening it,
closing it, then setting it to true and reopening it. You could do this
with a global variable that begins false and is changed to true after the
first event. The each time to form opens it can refer to the global
variable, and the form would be visible = true - and open only once - if the
global variable is set to true.

HTH,

Bernie Yaeger
 

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

Back
Top