|
-
Jul 17th, 2002, 08:50 PM
#1
Thread Starter
Fanatic Member
EZ Always on top!!!!????
Ok, I'm not wanting to use a module or anything to do this. I have a form that the user selects options on. I want to keep this window on top until it is closed. What's the EASIEST way to acomplish this?
-
Jul 17th, 2002, 09:06 PM
#2
PowerPoster
Depends on what you want. You can use API's to put the window on top while still being able to use other forms - like a Find window, for example.
For your purposes, just use show with vbmodal
Form1.Show vbModal
-
Jul 17th, 2002, 09:24 PM
#3
Thread Starter
Fanatic Member
I can't.......
I'm executing code on the main form while the other windows are visible, and using vbmodal will kill that code. I just want to keep the window on top of Everything until it is closed, but still be able to use other forms.
-
Jul 17th, 2002, 09:26 PM
#4
PowerPoster
VB Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewLong As Long) As Long
Private Const GWW_HWNDPARENT = -8
Public Function AlwaysOnTop(frm As Form, frmParent As Form) As Long
On Error Resume Next
AlwaysOnTop = SetWindowLong(frm.hwnd, GWW_HWNDPARENT, frmParent.hwnd)
End Function
-
Jul 17th, 2002, 09:35 PM
#5
-
Jul 17th, 2002, 10:21 PM
#6
Thread Starter
Fanatic Member
What syntax?
what syntax would I use on the form load event to make the form always on top?
TopMost (frmOptions)
I'm sure I screwed this up really bad so please help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|