re: how can I switch tasks thru code in C# - CSharp

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

+ Reply to Thread
Results 1 to 2 of 2

re: how can I switch tasks thru code in C#

  1. Default re: how can I switch tasks thru code in C#

    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;

    }







  2. Default Re: how can I switch tasks thru code in C#

    anyone know how to "fake" a taskbar click from windows ?? I am getting
    desperate here !!



+ Reply to Thread

Similar Threads

  1. how can I switch tasks thru code in C#
    By Application Development in forum CSharp
    Replies: 0
    Last Post: 06-08-2006, 11:23 PM
  2. how can I switch tasks thru code in C# ?
    By Application Development in forum CSharp
    Replies: 3
    Last Post: 05-31-2006, 04:38 AM
  3. When to switch from SWITCH() to JOIN
    By Application Development in forum ADO DAO RDO RDS
    Replies: 0
    Last Post: 07-29-2005, 11:42 AM
  4. Ant Tasks
    By Application Development in forum Java
    Replies: 0
    Last Post: 07-16-2004, 05:11 PM
  5. Generating tasks and getting the Updated tasks programatically
    By Application Development in forum Microsoft Exchange
    Replies: 3
    Last Post: 04-21-2004, 08:11 AM