Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tricky quez about MDI

Status
Not open for further replies.

olekr

Instructor
May 27, 2001
19
NO
Hi!
After spending hours, I have giving this up...
1. How can I get a vb-appl. with a MDI-form staying on top? I find using HWND not possible with a MDI-form...
2. Is it possible to convert a form into a MDI?
Thanks!
Ole
 
as for #1....

Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE

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 Sub MDIForm_Load()

Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)

End Sub



tryp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top