Solved

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

Posted on 2011-09-13
3
363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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