Thread: OnDeactivate event

  1. #1
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367

    OnDeactivate event

    Hi would someone be able to help us on this. I am trying to detect an OnDeactivate event from TApplication. However, i'm not quite sure how i can detect this event from within my application. The OnDeactivate within my form only detects if another form has been deactivated, and not the whole application.

    any help would be greatly appreciated.....
    Be a leader and not a follower.

  2. #2
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    I have created my own event handler which tries to reactivate the application, but it only flashes on the task bar. I need the whole window to be set in focus.

    Code:
    void __fastcall TForm1::AppDeactivate(TObject *Sender)
    
    {
      HWND Window = FindWindow(NULL, "Form1");
      SetForegroundWindow(Window);
    }
    Be a leader and not a follower.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 03:27 AM
  2. Actors, cues, event based logic.
    By Shamino in forum Game Programming
    Replies: 2
    Last Post: 04-27-2006, 10:58 PM
  3. XWindows- Close window event?
    By Exile in forum Linux Programming
    Replies: 8
    Last Post: 01-09-2005, 10:39 PM
  4. Replies: 2
    Last Post: 09-22-2003, 01:47 PM