Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
Hi All

Please can someone advice.
I have a datagridview (Windows Application) and if user double clicks a row then this command should run in the background. user1 will be the selected user.
c:\users\cmw\desktop\user1.piv .

Can please someone advice me how to achieve this.


Many Thanks

suman
Posted
Comments
Nelek 26-Aug-14 11:59am    
babli3 26-Aug-14 12:18pm    
i tried
private void dgvReport_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
{

var Processstartinfo = new ProcessStartInfo
{
FileName = "cmd"
};
Process process = Process.Start(Processstartinfo);

}

I want to open the command prompt with that particular path.

Thanks
Sergey Alexandrovich Kryukov 26-Aug-14 13:08pm    
Better use a thread from a thread pool (or BackgroundWorker), or alternatively, re-use the same thread created once in the application lifetime.
But if you use Process.Start, this is not needed, because the process itself is executed in parallel.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900