Click here to Skip to main content
15,913,836 members
Home / Discussions / C#
   

C#

 
AnswerRe: password assgning application? Pin
Sun Rays12-Nov-07 22:33
Sun Rays12-Nov-07 22:33 
GeneralRe: password assgning application? Pin
shaz jazz13-Nov-07 2:32
shaz jazz13-Nov-07 2:32 
GeneralRe: password assgning application? Pin
shaz jazz22-Nov-07 11:42
shaz jazz22-Nov-07 11:42 
AnswerRe: password assgning application? Pin
Michael Sync12-Nov-07 22:37
Michael Sync12-Nov-07 22:37 
AnswerRe: password assgning application? Pin
Adeel Chaudhry12-Nov-07 23:27
Adeel Chaudhry12-Nov-07 23:27 
QuestionDynamic Table Alignment from C#.Net codebehind Pin
jaishankar270412-Nov-07 21:56
jaishankar270412-Nov-07 21:56 
AnswerRe: Dynamic Table Alignment from C#.Net codebehind Pin
Sun Rays12-Nov-07 22:09
Sun Rays12-Nov-07 22:09 
QuestionDynamic Table Alignment from C#.Net codebehind Pin
jaishankar270412-Nov-07 21:55
jaishankar270412-Nov-07 21:55 
AnswerRe: Dynamic Table Alignment from C#.Net codebehind Pin
Vasudevan Deepak Kumar13-Nov-07 20:36
Vasudevan Deepak Kumar13-Nov-07 20:36 
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 
Hello *,

I would like to ask on the showing windows.
I am creating toolbar were will be two buttons which will shown gvim and notepad.

C# code is following:
[DllImport("User32")]
private static extern int ShowWindow(int hwnd, int nCmdShow);

private void btnGvim_Click(object sender, EventArgs e)
{
Process[] newProcesses = Process.GetProcesses();
foreach (Process newProcess in newProcesses)
{
if (newProcess.ProcessName.Equals("gvim"))
{
int number1 = (int)newProcess.MainWindowHandle;
ShowWindow(number1, SW_TEST);
}
}
}

private void btnNotepad_Click(object sender, EventArgs e)
{
Process[] newProcesses = Process.GetProcesses();
foreach (Process newProcess in newProcesses)
{
if (newProcess.ProcessName.Equals("notepad"))
{
int number1 = (int)newProcess.MainWindowHandle;
ShowWindow(number1, SW_TEST);
}
}
}

What should be inserted in value SW_TEST?
I would like to simulate behavior of ALT+TAB.

Thanks for your hints.

regards
Petr

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 
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 

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.