PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Windows Mobile Development (http://forum.ppcgeeks.com/forumdisplay.php?f=9)
-   -   Need some help with Visual Basic (http://forum.ppcgeeks.com/showthread.php?t=77839)

Jmz 08-03-2009 05:49 PM

Need some help with Visual Basic
 
So all I need to know is how to call an external program via VB. I am using the code below but it says file not found. The file is there without a doubt. I am thinking I am writing the right path to the file. I am just using the same path format that the registry uses. Thanks

Code:

Shell("\Program Files\Opera Mobile\OperaL.exe")

elephant007 08-03-2009 08:09 PM

Re: Need some help with Visual Basic
 
if you're trying to call this from the C:\ drive, you need to put (C:\Program Files\Opera Mobile\OperaL.exe")

alternatively you can
Code:

Dim OperaPath, WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
OperaPath = "C:\Progam Files\Opera Mobile\"
WSHShell(OperaPath & "OperaL.exe")

still would like to see more of your code though

Jmz 08-03-2009 08:25 PM

Re: Need some help with Visual Basic
 
Quote:

Originally Posted by elephant007 (Post 1079649)
if you're trying to call this from the C:\ drive, you need to put (C:\Program Files\Opera Mobile\OperaL.exe")

alternatively you can
Code:

Dim OperaPath, WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
OperaPath = "C:\Progam Files\Opera Mobile\"
WSHShell(OperaPath & "OperaL.exe")

still would like to see more of your code though


My bad. This is for a pocket pc app. I probably should have mentioned that in my original post

elephant007 08-03-2009 10:11 PM

Re: Need some help with Visual Basic
 
Quote:

Originally Posted by jmztaylor (Post 1079677)
My bad. This is for a pocket pc app. I probably should have mentioned that in my original post

Might have been helpful

try
Code:

Run("Program Files\Opera Mobile\OperaL.exe")
or
Code:

Shell("Program Files\Opera Mobile\OperaL.exe")
is this vbscript that you're trying to run or mort script?


All times are GMT -4. The time now is 09:04 PM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0