You know how you can open MyComputer and double click on C: ... that opens a window to browse drive C. How do you open a window like that from within VB? hmmm-hnnn...
Printable View
You know how you can open MyComputer and double click on C: ... that opens a window to browse drive C. How do you open a window like that from within VB? hmmm-hnnn...
i = Shell("c:\windows\explorer.exe", 3) ' 3=maximized
Hello Catocom!
I think Daniel_Bigham wants it to open in a specific directory.
Drop this into a module. There are two different methods. You can use either one.
[Edited by Nitro on 06-29-2000 at 02:21 PM]Code: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
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Const SW_SHOWDEFAULT = 10
Private Sub Main()
'Method1
Call ShellExecute(0, "Open", "C:\WhatEver Directory", vbNullString, vbNullString, SW_SHOWNORMAL)
'Method2
Call ShellExecute(0, "Explore", "C:\WhatEver Directory", vbNullString, vbNullString, SW_SHOWNORMAL)
End Sub
Beauty! Thanks for your help in getting that folder code... I'll give it a whirl on Tuesday.
My reason for asking was that my program has an "export to HTML" feature, and I wanted to open the folder that it creates the HTML file in for them to use... now I will be home free :)
This forum kicks :)
Thanks again.
PS Any suggestions on this idea: What if I want to send "rich text" (Formatted text) to the clipboard so that it can be pasted into, say, an HTML email message? How could one go about THAT?