>I want to load a form in full screen and a small form that i want to be always visible untill i unload it and also while i m accessing the full screen form
>(i don't want to use MDI forms).
>all ideas are welcomed
>thx
Try this:
Place in MODULE
Global Const SWP_NOMOVE = 2Global Const SWP_NOSIZE = 1
Global Const HWND_TOPMOST = -1Global Const HWND_NOTOPMOST = -2
Global Const FLOAT = 1, SINK = 0
Public Declare Sub 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)
This is a sub within the module
Sub FloatWindow(X As Integer, action As Integer)
Dim wFlags As Integer, result As Integer
wFlags = SWP_NOMOVE Or SWP_NOSIZE
If action <> 0 Then
' Float
Call SetWindowPos(X, HWND_TOPMOST, 0, 0, 0, 0, wFlags)
Else
' Sink
Call SetWindowPos(X, HWND_NOTOPMOST, 0, 0, 0, 0, wFlags)
End If
End Sub
Code to use -->
'Float code
Dim f as integer
f = Screen.ActiveForm.hWndCall
FloatWindow(f, FLOAT)
'sink code
Dim f as integer
f = Screen.ActiveForm.hWndCall FloatWindow(f, SINK)to sink.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com