Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / October 2003



Tip: Looking for answers? Try searching our database.

shellexecute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Goebel, Matthias - 31 Oct 2003 17:11 GMT
How can I start Explorer at "Desktop" / "My Computer" / "My Network" with
ShellExecute[Ex] API ?
Can I call the file/folder context-menu(=right klick on file/folder in
explorer) with this API ?

Matthias
R. L'abée - 31 Oct 2003 19:44 GMT
> How can I start Explorer at "Desktop" / "My Computer" / "My Network" with
> ShellExecute[Ex] API ?
> Can I call the file/folder context-menu(=right klick on file/folder in
> explorer) with this API ?
>
> Matthias

You can send the directory path as parameter when you start Explorer.
So the function will look like this:

'----------------------------------------
   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 Sub cmdOpen_Click()
       ShellExecute Me.hwnd, "Open", "Explorer", "C:\windows", "", 1
   End Sub
'----------------------------------------

I don't know if you can call the file/folder context-menu with this API.

Reinier
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.