Solved

VB.Net Menu Application to Launch Executables

Posted on 2012-04-06
1
439 Views
Last Modified: 2012-04-09
I have written multiple vb.net applications and published them as executables.  I would like to create one vb.net Menu app that will launch thes executables with the click of a menu option.

What is the best approach?  If my idea is do-able, will I need to build a script to install all the the menu and all executable apps on each desktop when deployed.  Is there a better solution than vb.net?

pfc
0
Comment
Question by:pfc42355
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37817995
I'm sure you know the "menu app" will be a Forms app. You have a couple of options for starting the others.

Since the other applications are .NET applications, you can add references to them just the same as if they were .DLL library files. You would call Program.Main (assuming you didn't change the name of the default "Program" class), and you would pass that function any "command line" arguments you might have passed had you started the apps from a command prompt. This means that the other apps will be loaded into the same AppDomain as your application.

Since the other applicatons are also "standalone" applications (in that you can execute them directly from a command prompt), you could also start the applications as separate processes from your main menu application. They would not share the same AppDomain via this method. For this method, you would need to look into the Process class. As a quick example, you could do something like this:

Imports System.Diagnostics

...

Dim p As New Process()

p.Start("C:\path\to\some\executable.exe", "some parameter values if needed, otherwise leave out or pass empty string")

' p.WaitForExit()  ' If you need to wait until the app has completed before continuing

Open in new window

0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Synchronize a new Active Directory domain with an existing Office 365 tenant
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

816 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

7 Experts available now in Live!

Get 1:1 Help Now