Need Help Invoking A Load Handler Programmatically in Visual Stutio .NET using Visual Basic

Hello,

I am developing a VB.NET PC application using Visual Studio 2008 with the .NET 3.5 Framework.

My code pops a dialog box, which has code attached to the dialog's Load event.

I have a button on the dialog whose handler performs some preliminary operations to clear most of the controls on the dialog, and then needs to rerun the dialog's Load handler.  Can anyone tell me what syntax to use to re-invoke the dialog's Load handler subroutine?  I've tried various syntax combinations, but none will compile.

If this is impossible, I could copy/paste the code in the dialog's Load handler subroutine into the handler for the button, but this is not an attractive option as the code is long and it would be nice to just have it one place (i.e., so updates don't have to made twice).

Thanks, Stu Engelman
stuengelmanAsked:
Who is Participating?
 
Luis PérezConnect With a Mentor Software Architect in .NetCommented:
Have you tried this?

Call myDialogName_Load(Nothing, Nothing)

Hope that helps.
0
 
stuengelmanAuthor Commented:
Roland,

Thank you!!!!  It works.

You're the best, Stu
0
 
stuengelmanAuthor Commented:
Great job - fast and accurate.  A+++++
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.