VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Correct way to determine when your visual basic application gains or loses focus.

Anonymous  (267 Submissions)   Windows System Services   Visual Basic 5.0   Unknown Difficulty   Wed 22nd December 1999   Mon 8th February 2021

Correct way to determine when your visual basic application gains or loses focus.

API Declarations



Declare Function CallWindowProc Lib "user32" Alias _
"CallWindowProcA" (ByVal lpPrevWndFunc As Long, _
ByVal hwnd As Long, ByVal Msg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long

Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Public Const WM_ACTIVATEAPP = &H1C
Public Const GWL_WNDPROC = -4

Global lpPrevWndProc As Long
Global gHW As Long

Rate Correct way to determine when your visual basic application gains or loses focus. (3(3 Vote))
Correct way to determine when your visual basic application gains or loses focus..bas

Correct way to determine when your visual basic application gains or loses focus. Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters