Loading UserControl on a ShowDialog Form sequence strange

D

**Developer**

I have a little more info about this problem I can't seem to solve!

I know it'll take a minute to study the lising but if you like to sove
puzzles there is one there.

I have a Form (FV&C) containing a userconrtrol (CF&E)

I do a ShowDialog for the form and the form's Load event calls a method of
the UserControl.

I peppered the code with writes and the following resulted.

Note that for the fist time, the usercontrol's Load event runs before the
form's Load event starts.

But, notice at the bottom of the list that for the second time, the
usercontrol's Load event runs after the form's Load event ends.

And notice the Visible properties!

Does this make sense to you?

Any suggestions as to what is going on?

It just occured to me that I never set a return dialog value. Must I?



FV&C New Staring
CF&E New Staring
CF&E New Ending
FV&C New Ending
*******Call FV&C method
*******Do FV&C.ShowDialog
CF&E Load Staring. Visible = True
CF&E Load Ending
FV&C Load Staring. Visible = True
FV&C Calling method in CF&E
FV&C Load Ending
FV&C Button Clicked
FV&C Button Routine Ending do Me.Close to close FV&C
FV&C Closing
FV&C Closed
*******After FV&C.ShowDialog Returned
*******
*******Call FV&C method
*******Do FV&C.ShowDialog
FV&C Load Staring. Visible = False
FV&C Calling method in CF&E
FV&C Load Ending
CF&E Load Staring. Visible = True
FV&C Button Clicked
FV&C Button Routine Ending do Me.Close to close FV&C
FV&C Closing
FV&C Closed
*******After FV&C.ShowDialog Returned
 
C

Cor Ligthert [MVP]

Developer,

The only result from resending questions in the same way will mostly be as I
have seen, is that your questionms are ignored after a while.

You can reply better your question rephrased in the same thread. You get
mostly no answers if the ones who read them don't understand them and leave
them for somebody else who understands them maybe better.

Just my thought,

Cor
 
D

**Developer**

Sometimes I get a different view on a topic as I work it and feel the
subject no longer reflects the question.

I assume some decide to read or not read a question by reading the subject.

Using an old thread does nothing to reduce the bandwidth used.

But thanks for letting me know how you view it.


Thanks
 

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