День добрый.
Скажите, уважаемые, как можно отловить конец события Form_Resize()
Имеется ввиду, что при изменении размера, постоянно генерируется событие Form_Resize(). А как отловить последнее Form_Resize() игнорируя все до него.
Спасибо.
Option Explicit
Private Sub Form_Load()
OldWindowProc = GetWindowLong(Me.hwnd, GWL_WNDPROC)
Call SetWindowLong(Me.hwnd, GWL_WNDPROC, AddressOf SubClass1_WndMessage)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call SetWindowLong(Me.hwnd, GWL_WNDPROC, OldWindowProc)
End Sub
Option Explicit
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public 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
Public Const GWL_WNDPROC = (-4)
Const WM_WINDOWPOSCHANGED = 71
Public OldWindowProc As Long
Public Function SubClass1_WndMessage(ByVal hwnd As Long, ByVal Msg As Long, ByVal wp As Long, ByVal lp As Long) As Long
SubClass1_WndMessage = CallWindowProc(OldWindowProc, hwnd, Msg, wp, lp)
If Msg = 71 Then Debug.Print "Last resize"
End Function
Сейчас этот форум просматривают: AhrefsBot и гости: 91