Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » API

Post new topic   Reply to topic
opening applications
View previous topic :: View next topic  
Author Message
steph
Freshman


Joined: 13 Sep 2004
Posts: 28

PostPosted: Sep 13th, 2004 02:26 AM    Post subject: opening applications Reply with quote

Hello Smile

I wanted to know if it was possible to create a command button and when clicked on, it would open MSN Messenger or Yahoo Messenger.

Any help would be greatly appreciated

Thanks Smile

steph
Back to top
View user's profile Send private message
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Sep 13th, 2004 02:37 AM    Post subject: Reply with quote

Hello steph,

Yes this can be achieved very easily. Use the following code:

[vb:1:663bd7c426]'This will launch MSN Messenger.
Shell "c:\program files\messenger\msmsgs.exe"[/vb:1:663bd7c426]

Now all you have to do is put the above code in a command button and when clicked it will launch the MSN Messenger. You must change the file path i have given to your path.

Hope this helps!

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
steph
Freshman


Joined: 13 Sep 2004
Posts: 28

PostPosted: Sep 13th, 2004 02:42 AM    Post subject: Reply with quote

Thank you very much for your quick reply. Smile
Back to top
View user's profile Send private message
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Sep 13th, 2004 02:58 AM    Post subject: Reply with quote

Hi steph,

Glad i was of some help! Hope to hear from you in future.

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
rbgCODE
Regular


Joined: 11 Nov 2004
Posts: 54
Location: Manchester CT

PostPosted: Nov 15th, 2004 10:35 PM    Post subject: Reply with quote

No offense, but shell is weak. You should use the registry to find the application associated with that application and open it that way. A good example is..

[vb:1:6511da50b6]Private 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


Public Sub xstart(xpath As String)
Call ShellExecute(hwnd, "Open", xpath, "", App.Path, 1)
End Sub[/vb:1:6511da50b6]
_________________
'><>
'rBg
'><>
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Nov 16th, 2004 12:59 AM    Post subject: Reply with quote

Hi rbgCODE,

None taken. I am glad to know this. Smile Though shell would be easy to learn and implement for new VB users. But yes you're right shell is indeed weak.

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » API All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic