how can i set a form position behind another.
i only have handles.
Printable View
how can i set a form position behind another.
i only have handles.
The SetWindowPos API function is propably what you're looking for.
Check ww.allapi.net for declaration and usage.
allapi.net is no longer available :(
Um, how about MSDN?? :eek: ?? :confused: :confused:
i know but i sets to top or bottom.
what i want to do is to set a form behind a specified form.
but i have only handles.
Code:Private sub SetBehind(Handle1 as long,Handle2 as long)
'set Handle2 behind Handle1
end sub
SetWindowPos allows you to set relative z-order position also:Code: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_NOACTIVATE = &H10
Private Const SWP_NOSIZE = &H1
Private Const SWP_FLAGS = SWP_NOMOVE Or SWP_NOACTIVATE Or SWP_NOSIZE
Private Sub Command1_Click()
SetWindowPos Handle1, Handle2, 0&, 0&, 0&, 0&, SWP_FLAGS
End Sub
ty, this was something i never known ;)
ty very much...
:eek: Anybody any idea what happened to Allapi.net?
MSDN certainly has all info, but Allapi was such a fantastic, good organized site to look up syntax, study samples and learn about all calls. I just don't know how to go on without them.
Thank you, Hannes, I check apifinder.
But hey, the other link is exactly what I used all the time under the name of Allapi.net. It still says so in the tag of my explorer. So nothing is really gone, only the base URL seems to have changed.
I always use their API-List to look at parameters and study sample code and then I use the API-viewer to find out what the constant values are. :)
I really would have missed that one. Thanks again. :wave:
AllAPI.net is now http://allapi.mentalis.org/
see this thread @ VBF for more info