Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

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

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.