how can I create a top most form?
Visual Basic
3
Posts
3
Posters
0
Views
1
Watching
-
The following will ensure the form is kept on top: Option Explicit 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 Const HWND_TOPMOST = -1 Const SWP_SHOWWINDOW = &H40 Const SWP_DRAWFRAME = &H20 Private Sub Form_Load() Dim retval As Long retval = SetWindowPos(Me.hwnd, HWND_TOPMOST, 100, 100, 100, 100, SWP_DRAWFRAME Or SWP_SHOWWINDOW) End Sub
-
In VB.NET, set the TopMost property to True. In VB6, search MSDN for Q184297 lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik