»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2003, 05:07 PM   #1 (permalink)
Registered User
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 1,856
FalcomPSX is on a distinguished road
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
VB .NET 2003 question

I"m using VB.net and had a simple question. I'm trying to make a command button launch an external program. How could I go about doing this?

__________________
- FalcomPSX
FalcomPSX is offline   Reply With Quote
Old 07-23-2003, 05:08 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Hmm I'm not terribly familiar with vb.net 2003..
But are you trying to start an MS office application or a 3rd party app?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 07-23-2003, 05:40 PM   #3 (permalink)
Registered User
 
Lemon's Avatar
 
Join Date: Oct 2001
Location: Lacey, Washington US
Posts: 514
Lemon is on a distinguished road
You can probably find your answer somewhere in This download of code samples from MS.
__________________
Reality is controled by those who are the most insane
Lemon is offline   Reply With Quote
Old 07-23-2003, 06:07 PM   #4 (permalink)
Registered User
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 1,856
FalcomPSX is on a distinguished road
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
I'm trying to launch a 3rd party app. I may need to have parameters in the launch line too. such as "generic.exe -switch filename.exe" or something like that. I'll look through those downloaded files.
__________________
- FalcomPSX
FalcomPSX is offline   Reply With Quote
Old 07-23-2003, 09:33 PM   #5 (permalink)
Registered User
 
Join Date: Sep 2002
Posts: 265
Creosote is on a distinguished road
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Shell("c:\winnt\notepad.exe", AppWinStyle.NormalFocus)
    End Sub
Creosote is offline   Reply With Quote
Old 07-24-2003, 11:51 AM   #6 (permalink)
Registered User
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 1,856
FalcomPSX is on a distinguished road
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
that's perfect, exactly what i needed, next question is are there system variables i can use to get the current windows directory? since it's sometimes it's windows, sometimes winnt?

*edit*
also, how would i find the working directory for a program? so it can be installed from any directory and have like a button that would launch notepad and open a specific file in that directory?
__________________
- FalcomPSX

Last edited by FalcomPSX; 07-24-2003 at 12:33 PM.
FalcomPSX is offline   Reply With Quote
Old 07-24-2003, 09:10 PM   #7 (permalink)
Registered User
 
Join Date: Sep 2002
Posts: 265
Creosote is on a distinguished road
There might be a namespace in .Net for it, I'm not sure. Anways, you can use the api

http://www.developerfusion.com/show/2561/
Creosote is offline   Reply With Quote
Old 07-24-2003, 10:36 PM   #8 (permalink)
Registered User
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 1,856
FalcomPSX is on a distinguished road
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
awesome, that solves half my problem with ease, now about getting the drive letter, or current operating path of a program...is there a easy trick for that too?
__________________
- FalcomPSX
FalcomPSX is offline   Reply With Quote
Old 07-24-2003, 11:56 PM   #9 (permalink)
Registered User
 
Join Date: Sep 2002
Posts: 265
Creosote is on a distinguished road
The application path is much easier:

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(Application.StartupPath)
    End Sub
Creosote is offline   Reply With Quote
Old 07-25-2003, 07:45 PM   #10 (permalink)
Registered User
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 1,856
FalcomPSX is on a distinguished road
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
that is easy. it's been a while since i screwed with vb at all and plus, i'm all self taught for the most part, so it's fun sometimes trying to figure out how to do stuff. Thanks a million for the tips!
__________________
- FalcomPSX
FalcomPSX is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 05:12 AM.