CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: question

  1. #1
    Join Date
    Jul 2001
    Posts
    430

    question

    I have program A and program B started. Usually I have to click on program A (set focus) to do something about program A and click B to do something about B. How can I press F2 key (or other key) to reset the focus on program B to play with it when the focus is on program A. thanks.


  2. #2
    Join Date
    Jul 2001
    Location
    Trivandrum, Kerala, India
    Posts
    21

    Re: question


    Hai,

    You can use the AppActivate command to activate (focus) another program from your program.

    For example

    AppActivate "Calculator"



    activates windows calculator, if calculator is running. Other wise it generates a trappable error.

    Hope this will work.

    All the best.

    Kishore


  3. #3
    Join Date
    Jul 2001
    Posts
    430

    Re: question

    thanks for your reply.

    my question is press F2 or other key to reset set focus on Program A when the focus is on Program B.
    Not from one program and call another program.

    I think that Program A should keep on running and wait for a key pressed even if it has no focus on it. When a key pressed, Program A catches it (get focus). This is my problem. I know that we can use 'API', but don't know which one and how.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured