Solved

Vb.Net Menu

Posted on 2016-10-27
1
20 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 32

Accepted Solution

by:
Stefan Hoffmann earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now