Solved

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

Posted on 2011-09-13
3
353 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now