[AccessD] BringToFront

Drew Wutka DWUTKA at marlow.com
Wed Jan 31 15:59:41 CST 2007


Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd 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
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const HWND_TOPMOST = -1
Private Sub PutMeOnTop()
    SetWindowPos Me.Hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
    SWP_NOMOVE Or SWP_NOSIZE
End Sub

This will put the form in front of everything.  It doesn't 'stick' though.
Access forms are subclassed windows, so to put it truly always on top is a
little trickier.

Drew

-----Original Message-----
From: JWColby [mailto:jwcolby at colbyconsulting.com] 
Sent: Wednesday, January 31, 2007 3:41 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] BringToFront

Is there a Bring To Front for a FORM?  I may have a series of progress
meters, which open modal, and as it happens centered and right on top of
each other.  I have devised a way to display an OK button which I display
the very last line as that process finishes IF I want the user to know that
a specific process finished.  The problem is that things being the way they
are, the one that is finishing may be physically hidden by another progress
meter on top.  I need to cause the progress meter that is displaying the "OK
to continue" to pop in front of anything else that may be currently
displayed.
 
John W. Colby
Colby Consulting
www.ColbyConsulting.com
 



More information about the AccessD mailing list