|
-
Oct 14th, 2009, 10:54 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Displaying Files in Explorer
I want to be able to display a file in windows explorer. I have been able to open the parent folder, but I would like to have a specific file selected in explorer. What VB .Net Code would I use to do this?
-
Oct 15th, 2009, 03:17 AM
#2
Hyperactive Member
Re: Displaying Files in Explorer
I assume you mean you want to have an open file dialog window that opens inside your application, and that should have a specific file type displayed. If so, read up on OpenFileDialog class and the ways in which you can filter the content.
Runesmith
The key to getting the right answer is asking the right question
I just realized: good health is merely the slowest possible rate at which one can die
-
Oct 15th, 2009, 05:42 AM
#3
Re: Displaying Files in Explorer
If you do actually mean Explorer itself and not an OpenFileDialog like Runesmith mentioned then you can just call the Explorer.exe with a specific argument that tells it which file to select:
Code:
explorer.exe /select,C:\test.txt
http://support.microsoft.com/kb/314853
-
Oct 16th, 2009, 08:32 PM
#4
Thread Starter
Addicted Member
Re: Displaying Files in Explorer
Thank-you chris128. That was what I was looking for. I would use an OpenFileDialog to get the path, but wanted to display them in Explorer.exe....
Sorry for the confusion, but at least I got my answer!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|