I remembered a sample shareware that I had seen from
Peter's Software (Look on the web). He originally
provided a database with a ton of Windows API routines.
This is something that I evolved from that.
Put the following in a module:
(They are each one line only)
Declare Function WM_apiGetParent Lib "user32" _
Alias "GetParent" (ByVal hndWindow As Long) As Long _
Declare Function WM_apiSetWindowPos Lib "user32" _
Alias "SetWindowPos" (ByVal hndAccessWindow As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, _
ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long
I put this on my main form.
Private Sub Form_Current()
'
' This is based on an old shareware sample from
' "Peter's Software"
'
Dim WM_SWP_NOZORDER As Integer
Dim WM_SWP_SHOWWINDOW As Integer
Dim hndWindow As Long
Dim hndAccessWindow As Long
Dim lngXLeft As Long
Dim lngYTop As Long
Dim lngWidth As Long
Dim lngHeight As Long
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.