SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old November 8th, 2004, 02:16 PM
earthsfate earthsfate is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 4 earthsfate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Executing file

How do i have a command button execute an application. (for example: trillian.exe)

Reply With Quote
  #2  
Old November 8th, 2004, 02:24 PM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 4
Talking

You can use shell function in VB

Reply With Quote
  #3  
Old November 8th, 2004, 05:26 PM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
[100% agree with darius]

Reply With Quote
  #4  
Old November 8th, 2004, 05:39 PM
earthsfate earthsfate is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 4 earthsfate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Darius
You can use shell function in VB

How might i write that code?

Reply With Quote
  #5  
Old November 8th, 2004, 08:58 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 33 m 48 sec
Reputation Power: 180
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #6  
Old November 9th, 2004, 03:46 AM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
Wink

it looks something like this (this one opens a web page in internet explorer):

Public Function ShellDocument(sDocName As String, _
Optional ByVal Action As String = "Open", _
Optional ByVal Parameters As String = vbNullString, _
Optional ByVal Directory As String = vbNullString, _
Optional ByVal WindowState As StartWindowState) As Boolean
Dim Response
Response = ShellExecute(&O0, Action, sDocName, Parameters, Directory, WindowState)
Select Case Response
Case Is < 33
ShellDocument = False
Case Else
ShellDocument = True
End Select
End Function


Private Sub mnuHelpvisitUs_Click()
ShellDocument "http://dondo.bravehost.com/index.htm"
End Sub

Reply With Quote
  #7  
Old November 9th, 2004, 02:58 PM
earthsfate earthsfate is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 4 earthsfate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Doug G
URL

So to have a command button cmdTrillian execute trillian.exe when i click it, the code would look something like this shell(c:\program files\trillian\trillian.exe), but i get an error.

Reply With Quote
  #8  
Old November 9th, 2004, 05:22 PM
JamesLe JamesLe is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Oakland, CA, USA
Posts: 131 JamesLe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m
Reputation Power: 4
Hello Earthsfate,

How about this:

Code:
Private Sub Command1_Click()
Dim runID As Variant
runID = Shell("c:\program files\trillian\trillian.exe", 1)
End Sub

Reply With Quote
  #9  
Old November 9th, 2004, 05:58 PM
earthsfate earthsfate is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 4 earthsfate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by JamesLe
Hello Earthsfate,

How about this:

Code:
Private Sub Command1_Click()
Dim runID As Variant
runID = Shell("c:\program files\trillian\trillian.exe", 1)
End Sub


Thanks alot

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Executing file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway