Click here to Skip to main content
15,893,381 members
Home / Discussions / C#
   

C#

 
Questionhow to select an existing TreeNode Pin
gerbenschmidt12-Nov-07 21:54
gerbenschmidt12-Nov-07 21:54 
AnswerRe: how to select an existing TreeNode Pin
Laubi12-Nov-07 22:17
Laubi12-Nov-07 22:17 
GeneralRe: how to select an existing TreeNode Pin
gerbenschmidt13-Nov-07 7:21
gerbenschmidt13-Nov-07 7:21 
QuestionDynamic Table Alignment Pin
jaishankar270412-Nov-07 21:53
jaishankar270412-Nov-07 21:53 
AnswerRe: Dynamic Table Alignment Pin
Vasudevan Deepak Kumar13-Nov-07 20:37
Vasudevan Deepak Kumar13-Nov-07 20:37 
QuestionShow two applications Pin
phracek12-Nov-07 21:30
phracek12-Nov-07 21:30 
AnswerRe: Show two applications Pin
Giorgi Dalakishvili12-Nov-07 21:33
mentorGiorgi Dalakishvili12-Nov-07 21:33 
AnswerRe: Show two applications Pin
Martin#12-Nov-07 21:44
Martin#12-Nov-07 21:44 
Hello,

Here are the three main constants for this Method (you will also find them in the excellent link from Giorgi Dalakishvili, Thanks for that!)
private const int SW_SHOWNORMAL    = 1;
private const int SW_SHOWMINIMIZED = 2;
private const int SW_SHOWMAXIMIZED = 3;


Apart from that,
You should use the GetProcessByName method of the Process class instead of iterating over all processes,
and do a
if(newProcess.MainWindowHandle!=IntPtr.Zero)
before pathing the Handle to the method!
And also dispose the returned processes!

Hope it helps!


All the best,

Martin

GeneralRe: Show two applications Pin
phracek12-Nov-07 21:50
phracek12-Nov-07 21:50 
GeneralRe: Show two applications Pin
Martin#12-Nov-07 21:53
Martin#12-Nov-07 21:53 
GeneralRe: Show two applications Pin
phracek12-Nov-07 21:57
phracek12-Nov-07 21:57 
AnswerRe: Show two applications Pin
Martin#12-Nov-07 22:09
Martin#12-Nov-07 22:09 
GeneralRe: Show two applications Pin
Giorgi Dalakishvili12-Nov-07 22:26
mentorGiorgi Dalakishvili12-Nov-07 22:26 
GeneralRe: Show two applications Pin
Martin#12-Nov-07 22:29
Martin#12-Nov-07 22:29 
GeneralRe: Show two applications Pin
Giorgi Dalakishvili12-Nov-07 22:31
mentorGiorgi Dalakishvili12-Nov-07 22:31 
Questiondelegates Pin
Sonia Gupta12-Nov-07 21:04
Sonia Gupta12-Nov-07 21:04 
AnswerRe: delegates Pin
Christian Graus12-Nov-07 21:06
protectorChristian Graus12-Nov-07 21:06 
AnswerRe: delegates Pin
J4amieC12-Nov-07 22:33
J4amieC12-Nov-07 22:33 
GeneralRe: delegates Pin
Christian Graus12-Nov-07 23:38
protectorChristian Graus12-Nov-07 23:38 
GeneralRe: delegates Pin
mav.northwind13-Nov-07 1:21
mav.northwind13-Nov-07 1:21 
GeneralRe: delegates Pin
Guffa13-Nov-07 1:26
Guffa13-Nov-07 1:26 
JokeRe: delegates Pin
Guffa13-Nov-07 2:59
Guffa13-Nov-07 2:59 
QuestionCan i make arraylist array? Pin
knodark12-Nov-07 21:00
knodark12-Nov-07 21:00 
AnswerRe: Can i make arraylist array? Pin
Christian Graus12-Nov-07 21:05
protectorChristian Graus12-Nov-07 21:05 
GeneralRe: Can i make arraylist array? [modified] Pin
knodark12-Nov-07 21:18
knodark12-Nov-07 21:18 

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.