Click here to Skip to main content
15,908,768 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# friendly guid Pin
Ennis Ray Lynch, Jr.19-Feb-09 4:42
Ennis Ray Lynch, Jr.19-Feb-09 4:42 
GeneralRe: C# friendly guid Pin
Mirko198019-Feb-09 5:25
Mirko198019-Feb-09 5:25 
QuestionRe: C# friendly guid Pin
Eddy Vluggen19-Feb-09 4:47
professionalEddy Vluggen19-Feb-09 4:47 
QuestionGet Window Thread ProcessId Pin
frommi19-Feb-09 3:37
frommi19-Feb-09 3:37 
AnswerRe: Get Window Thread ProcessId Pin
Calin Tatar19-Feb-09 4:49
Calin Tatar19-Feb-09 4:49 
GeneralRe: Get Window Thread ProcessId Pin
frommi19-Feb-09 4:57
frommi19-Feb-09 4:57 
GeneralRe: Get Window Thread ProcessId Pin
Calin Tatar19-Feb-09 5:07
Calin Tatar19-Feb-09 5:07 
GeneralRe: Get Window Thread ProcessId Pin
frommi20-Feb-09 3:17
frommi20-Feb-09 3:17 
Ok i try to explain my problem...
I made a sample application: with a button open a folder

(sorry for italian comment but i'm italian)

if (!IdProcessoCartellaDati.HasValue)
{
if (Processo == null)
{
// istanzia il processo
Processo = new Process();

// nome del processo
Processo.StartInfo.FileName = "explorer.exe";

// la cartella da aprire
Processo.StartInfo.Arguments = "C:\\Temp\\Log";

// controllo di eventuali errori
Processo.StartInfo.ErrorDialog = true;
Processo.StartInfo.ErrorDialogParentHandle = Handle;
Processo.StartInfo.UseShellExecute = true;

try
{
// esegue l'apertura della cartella
Processo.Start();

// memorizza l'id del processo
IdProcessoCartellaDati = Processo.Id;

}
catch (Exception)
{
// gli errori sono gestiti da Windows
}

// rilascia le risorse
Processo.Dispose();
}
}
else
{
Processo = Process.GetProcessById(IdProcessoCartellaDati.Value);
// ripristina la finestra (dimensioni)
ShowWindow(Processo.MainWindowHandle, SW_RESTORE);
// e la porta in primo piano
BringWindowToTop(Processo.MainWindowHandle);
}

This solution it's ok, but if i close the application with a explorer open on the specific folder, if i execute the appication again at the first click event Vista open another explorer window (and it's correct) but if i click again ,Vista open another window, and another...

I hope that you have understand my problem.
Thank you.
Bye Bye
AnswerRe: Get Window Thread ProcessId Pin
Giorgi Dalakishvili19-Feb-09 5:55
mentorGiorgi Dalakishvili19-Feb-09 5:55 
Question[Message Deleted] Pin
musefan19-Feb-09 3:09
musefan19-Feb-09 3:09 
AnswerRe: SQL Query Issue Pin
J4amieC19-Feb-09 3:28
J4amieC19-Feb-09 3:28 
Questionpasting data in datagridview possible..? Pin
Mubeen.asim19-Feb-09 2:54
Mubeen.asim19-Feb-09 2:54 
Questionhow to use treeview tool in C#.net? Pin
poonam jagdale19-Feb-09 2:46
poonam jagdale19-Feb-09 2:46 
AnswerRe: how to use treeview tool in C#.net? Pin
Calin Tatar19-Feb-09 3:05
Calin Tatar19-Feb-09 3:05 
Questionconnectivity with remote server Pin
Digubha19-Feb-09 2:41
Digubha19-Feb-09 2:41 
AnswerRe: connectivity with remote server Pin
poonam jagdale19-Feb-09 2:51
poonam jagdale19-Feb-09 2:51 
AnswerRe: connectivity with remote server Pin
Mubeen.asim19-Feb-09 2:56
Mubeen.asim19-Feb-09 2:56 
QuestionC# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
samskiter19-Feb-09 2:39
samskiter19-Feb-09 2:39 
AnswerRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
Rob Philpott19-Feb-09 3:14
Rob Philpott19-Feb-09 3:14 
GeneralRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
samskiter19-Feb-09 3:33
samskiter19-Feb-09 3:33 
GeneralRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
Rob Philpott19-Feb-09 3:46
Rob Philpott19-Feb-09 3:46 
GeneralRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
samskiter19-Feb-09 5:44
samskiter19-Feb-09 5:44 
GeneralRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
Rob Philpott19-Feb-09 6:34
Rob Philpott19-Feb-09 6:34 
GeneralRe: C# program structuring problem - Run in background - Teach a noob to do it properly :P Pin
samskiter19-Feb-09 6:57
samskiter19-Feb-09 6:57 
Questionhow to drag and drop image in c#.net & how to resize it after drop the image? Pin
poonam jagdale19-Feb-09 2:32
poonam jagdale19-Feb-09 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.