Solved

c# focus on file in explorer

Posted on 2009-07-10
2
681 Views
Last Modified: 2013-12-17
Im looking for a way to have focus on a specific file when I open windows explorer. I have a list of files in my app when I left click on a file I have "open containing folder" an this works but I want to have focus on that specific file. Is that even possible?

 
0
Comment
Question by:socom1985
2 Comments
 
LVL 3

Accepted Solution

by:
Joep_Killaars earned 500 total points
ID: 24821570
Exceute the following code :
            Process proc = new Process(); 
            
            proc.StartInfo.FileName = @"EXPLORER.exe"; 
            
            proc.StartInfo.Arguments = @"/select, c:\temp\yourfile.txt"; 
 
            proc.Start();

Open in new window

0
 
LVL 1

Author Closing Comment

by:socom1985
ID: 31601991
Thanks. Works great...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question