public const int WA_INACTIVE = 0;
public const int WA_ACTIVE = 1;
public const int WA_CLICKACTIVE = 2;
'''<summary>Deactivated.</summary>
Public Const WA_INACTIVE As Integer = 0;
'''<summary>
'''Activated by some method other than a mouse click (for example, by a call to
'''the SetActiveWindow function or by use of the keyboard interface to select the window).
'''</summary>
Public Const WA_ACTIVE As Integer = 1;
'''<summary>Activated by a mouse click.</summary>
Public Const WA_CLICKACTIVE As Integer = 2;
''' <summary>Used in wParam of a WM_ACTIVATE message</summary>
Public Enum WA As Integer
'''<summary>Deactivated.</summary>
INACTIVE = 0
'''<summary>
'''Activated by some method other than a mouse click (for example, by a call to
'''the SetActiveWindow function or by use of the keyboard interface to select the window).
'''</summary>
ACTIVE = 1
'''<summary>Activated by a mouse click.</summary>
CLICKACTIVE = 2
End Enum
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == Win32.WM_ACTIVATE && m.HWnd == f.Handle
&& Win32.LoWord(m.WParam.ToInt32()) == WA_INACTIVE) {
...
}
}