Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 07:14 PM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Rizzle-Q
Default How to: Open ANY file JUST LIKE Windows Explorer?

I want to open ANY file in Visual Basic JUST LIKE it would open in Windows Explorer... and I want that file to just open directly with nothing in the way...

I tried:
>
Path = "C:\some_file." 'change this to whatever path and/or file you want
Call Shell("C:\WINNT\Explorer " + Path) 'WINNT because I have Windows 2000
<

->This code works except it opens an Open/Save box and I don't want that.

Also this code:
>
Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE")
<

Works also but only for .exe files...

 
Old March 22nd, 2006, 07:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use ShellExecute
 
Old March 22nd, 2006, 08:05 PM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Rizzle-Q
Default

What is the syntax for ShellExecute ??

 
Old March 22nd, 2006, 10:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

a simple search with google:

http://www.mentalis.org/apilist/ShellExecute.shtml

that is one the best "vb friendly" web site for Windows API
 
Old March 22nd, 2006, 10:37 PM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Rizzle-Q
Default

Right right... thanks a bunch... I'll see if this works...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Open .ASPX in Internet Explorer toddw607 ASP.NET 2.0 Basics 1 April 2nd, 2007 08:05 AM
Call windows' "Open file" dialog box from an swf vicky_barse Flash (all versions) 1 December 30th, 2005 12:47 PM
windows explorer sonurijs Servlets 0 March 8th, 2005 12:56 AM
Internet Explorer between Windows and MacIntosh rpalanivelu Javascript 2 August 31st, 2004 10:52 PM
Display data into windows explorer din_porwal Pro VB.NET 2002/2003 0 August 26th, 2004 02:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.