How to run an application ( .exe file) from visual basic ? ?
-
i've built a console application (.exe) using c++ . Now I want to run this application by visual basic code. I used the following method Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Command1_Click() ShellExecute 0, vbNullString, "c:\poreflow.exe", bNullString, vbNullString, 1 End Sub This method sometimes works and sometimes dose not work. however when the vb can not run the application i can run it by directly clicking on it ( i.e. the .exe file is OK ) . any suggestion ?
-
Answer:
Re- run the code through your program then restart ur computer if that doesn't work your code is messed up scan through it and find and fix!
Alphino at Yahoo! Answers Visit the source
Related Q & A:
- What Is MSI File And How Is It Different From EXE File?Best solution by Stack Overflow
- How to run an interactive batch file on windows from a service?Best solution by Stack Overflow
- In Visual Studio 2012 or 2013, how can I register a DLL file on Windows 7 64-bit computer using a Custom Action command?Best solution by Stack Overflow
- How do you use the Contains Function in Visual Basic?Best solution by go4expert.com
- How do I output from one form to another in Visual Basic?Best solution by support.microsoft.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.