We help IT Professionals succeed at work.
Get Started

use of shell command in Visual Basic Express 2008

Last Modified: 2013-12-17
I am writing a program in Visual Basic Express 2008. I need to call an executable using a button click. I have two buttons in the program. . Somehow the executable does not seem to run. If I run the executable from the command line it always works and throws up a menu in the screen. When called from my visual basic program nothing shows up the screen. What am I doing wrong? The second button which calls calc.exe always works.The code is shown below. If I replace the content of the shell for button1_click with the pathname for calc.exe, then that runs.
Public Class mgmt_suite
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MgmtSuite.Click
        Shell("C:\L1Applications\bin\L1-IMS", AppWinStyle.MaximizedFocus)
    End Sub
    Private Sub Global_traveler_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Global_Traveler.Click
    End Sub
    Private Sub mgmt_suite_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    End Sub
End Class

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE