Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > How to launch explorer?


Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2005, 07:27 PM
Will403536 Will403536 is offline
Newcomer
 
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
Default How to launch explorer?


Hello. Sorry for being such a Visual Basic newbie, but how would I launch a standard Windows Explorer window to a the root directory of the program that is running from that program? For instance, say "mux.exe" is running. What code what I need in order to create a new Windows Explorer window that shows whatever directory "mux.exe" is in--like if "mux.exe" was located at C:\mux\mux.exe, it would open up a Windows Explorer window that is showing C:\mux.

Any help would be appreciated... as I just learned the "End" command today.

Reply With Quote
  #2  
Old 04-26-2005, 07:30 PM
couch612's Avatar
couch612 couch612 is offline
Senior Contributor
 
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
Default

Shell "explorer.exe c:\mux", vbNormalFocus
__________________
Cheers,
Peter W.
Reply With Quote
  #3  
Old 04-26-2005, 07:35 PM
Will403536 Will403536 is offline
Newcomer
 
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
Default

Wow, thx for the timely response, but should it be:
---
Shell "explorer.exe c:\mux"
vbNormalFocus
---
Or as you typed it, in one line: --- Shell "explorer.exe c:\mux", vbNormalFocus ---?

And what if the program is running from a CD, whose drive letter I may NOT know: is it E or F or even G, etc. So is there a command to just go to the root of the program, the folder that the active program is running from?

Thx.

Reply With Quote
  #4  
Old 04-26-2005, 07:37 PM
couch612's Avatar
couch612 couch612 is offline
Senior Contributor
 
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
Default

in that case:

Code:
Shell "explorer.exe " & app.path, vbNormalFocus
__________________
Cheers,
Peter W.
Reply With Quote
  #5  
Old 04-26-2005, 07:38 PM
Will403536 Will403536 is offline
Newcomer
 
Join Date: May 2004
Location: Las Vegas, NV!
Posts: 21
Default

Thx. So fast... do you live on these forums!?!?

geesh.

Reply With Quote
  #6  
Old 04-26-2005, 07:39 PM
couch612's Avatar
couch612 couch612 is offline
Senior Contributor
 
Join Date: Sep 2002
Location: Brisbane, Australia
Posts: 1,209
Default

lol only when there is nothing on at work.
__________________
Cheers,
Peter W.
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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->