anyone know how to "fake" a taskbar click from windows ?? I am getting
desperate here !!
This is a discussion on re: how can I switch tasks thru code in C# - CSharp ; I am still having problems with switching thru tasks in such a way that it will work properly for me ... here is the basic information and a code snippet follows below .. My program is running and I need ...
I am still having problems with switching thru tasks in such a way that it
will work properly for me ... here is the basic information and a code
snippet follows below ..
My program is running and I need to switch to another (directx based)
program already running as a task. The code I have so far works when only my
program and the ProgramToSwitchTo are running , if I have something else
running like notepad it first A) goes into the ProgramToSwitchTo and
then B) jumps right out again and goes right into notepad or whatever else
I might have running... Note if I come out of my program to the desktop and
then click on the ProgramToSwitchTo BUTTON , it will go in and work just
like any normal button click from the desktop with do . I would be happy
coding something that does it that way , or ANY other way ...
Since I can't , as per usual get any information from MSDN or anywhere on
the net , so far , I appeal to all you brainiacs to see if there is a
workable solution out there !!!
_________________________________________________________________________
if (proc.ProcessName == "ProgramToSwitchTo")
{
/*if (SetForegroundWindow(proc.MainWindowHandle)==false)
{
MessageBox.Show("cant switch to ProgramToSwitchTo") ;
return;
}*/
ShowWindow(proc.MainWindowHandle,1);
Form1_Resize(this,e);
break;
}
anyone know how to "fake" a taskbar click from windows ?? I am getting
desperate here !!