OnDeactivate event

This is a discussion on OnDeactivate event within the Windows Programming forums, part of the Platform Specific Boards category; Hi would someone be able to help us on this. I am trying to detect an OnDeactivate event from TApplication. ...

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

    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
    359
    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, 02: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, 09:39 PM
  4. Replies: 2
    Last Post: 09-22-2003, 01:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21