Solved

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

Posted on 2011-09-13
3
358 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:stuengelman
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 500 total points
ID: 36528540
Have you tried this?

Call myDialogName_Load(Nothing, Nothing)

Hope that helps.
0
 

Author Comment

by:stuengelman
ID: 36528713
Roland,

Thank you!!!!  It works.

You're the best, Stu
0
 

Author Closing Comment

by:stuengelman
ID: 36528720
Great job - fast and accurate.  A+++++
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error handling in asp.net site 5 29
Sql server insert 13 32
Expression Evaluater 3 27
Help with adding DLL file in Windows project 20 32
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question