Solved

Vb.Net Menu

Posted on 2016-10-27
1
36 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
[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
1 Comment
 
LVL 33

Accepted Solution

by:
ste5an earned 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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