G
Guest
I have a program that mixes wizard like behavior with random access to the
various dialogs in the wizard. I do this by having each step map to a
toolstripmenuitem. Users can randomly choose the menu item and get the
corresponding dialog. Alternatively at the completion of each dialog, I can
"click" on the menu item and cause the appropriate dialog to come up. It
works rather well but the way I've done it is a horrible kludge. I even left
things out the first time:-(((
I put click in quotes above because I have yet to come up with an elegant
way to do this as noted. What I want is to be able to compute the name of the
next menu item to call and cause its click code to execute, preferably in a
way that exactly mimics the user action.
QUESTION: What is the best approach to do this so that I don't stack up a
whole pile of nested calls most of which are right at the end of the previous
call?
QUESTION: In other environments i'd post/send (I always have to look up
which does it asynchronously) a WM_Click message to the control. Is that the
right thing to do here? If so what is the .net way to do it?
I've tried using reflection to get the eventinfo etc and invoke the event.
That fails because at some point in the process reflection returns NOTHING.
(Code upon request.) QUESION: If I had been able to get reflection to work
what are the odds I would have ended up with that undesired stack of calls.
BOTTOM LINE QUESTIONS: If variable mi contains a toolstripmenuitem whose
click event you wish to cause / invoke, preferablly asynchronously (i.e
through the genration of some kind of message processed by the message loop)
what is the best way to do it? If my fetish for asynchronicity is
inappropriate, then why? What is the synchronous way to do this.
--
Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz
various dialogs in the wizard. I do this by having each step map to a
toolstripmenuitem. Users can randomly choose the menu item and get the
corresponding dialog. Alternatively at the completion of each dialog, I can
"click" on the menu item and cause the appropriate dialog to come up. It
works rather well but the way I've done it is a horrible kludge. I even left
things out the first time:-(((
I put click in quotes above because I have yet to come up with an elegant
way to do this as noted. What I want is to be able to compute the name of the
next menu item to call and cause its click code to execute, preferably in a
way that exactly mimics the user action.
QUESTION: What is the best approach to do this so that I don't stack up a
whole pile of nested calls most of which are right at the end of the previous
call?
QUESTION: In other environments i'd post/send (I always have to look up
which does it asynchronously) a WM_Click message to the control. Is that the
right thing to do here? If so what is the .net way to do it?
I've tried using reflection to get the eventinfo etc and invoke the event.
That fails because at some point in the process reflection returns NOTHING.
(Code upon request.) QUESION: If I had been able to get reflection to work
what are the odds I would have ended up with that undesired stack of calls.
BOTTOM LINE QUESTIONS: If variable mi contains a toolstripmenuitem whose
click event you wish to cause / invoke, preferablly asynchronously (i.e
through the genration of some kind of message processed by the message loop)
what is the best way to do it? If my fetish for asynchronicity is
inappropriate, then why? What is the synchronous way to do this.
--
Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz