Solved

Vb.Net Menu

Posted on 2016-10-27
1
41 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 34

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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