?
Solved

Vb.Net Menu

Posted on 2016-10-27
1
Medium Priority
?
46 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 35

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 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