Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright ©1996-2005 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Const GWL_HWNDPARENT = (-8)
Public Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA"_
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal wNewLong As Long) As Long
Option Explicit
Private OriginalParenthWnd As Long
Private Sub Form_Load()
OriginalParenthWnd = SetWindowLong(Me.hwnd, _
GWL_HWNDPARENT, _
parent.hwnd)
End Sub
Private Sub Form_Unload()
'Restore the original parent before unloading
Call SetWindowLong(Me.hwnd, GWL_HWNDPARENT, OriginalParenthWnd)
End Sub
Сейчас этот форум просматривают: Google-бот, Yandex-бот и гости: 145