[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Vb.Net Menu

Posted on 2016-10-27
1
Medium Priority
?
54 Views
Last Modified: 2016-10-28
Hi Experts

I Have a menu Structure
Click on drop down and it runs a program
see following code
I need to finish the first program then automatically run the second
not run the second until the first is completed
I know I can run from first program newprogram on close or save events
but need to return to menu to check other variables before running 2nd program newprogram2

Private sub newprogram_click(ByValue sender as tObject,ByVal e As Enventargs)_
handles newprogram.Click

dim newprog as new newprogram()
newprog.show()

dim newprog2 as new newporgram2()
newprog2.show()

End sub



  

Open in new window

0
Comment
Question by:Kevinfeening
1 Comment
 
LVL 36

Accepted Solution

by:
ste5an earned 2000 total points
ID: 41861806
The show() methods must be blocking. Otherwise it's not possible.

btw, what are your "program" classes doing? show sounds like simple windows. Here we have the built-in option of modal windows:

- Displaying Modal and Modeless Windows Forms
- https://msdn.microsoft.com/en-us/library/system.windows.forms.form.modal(v=vs.110).aspx

Or use the chain of responsibility pattern with a null or result collecting object.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 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