-
Hi,
Can anyone explain what are all the paramiters in the function below?
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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
Thanks alot.
-
Sure!
This is the code I use in my WindowClass to set it on top or not.
Code:
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
Public Property Let AlwaysOnTop(WinhWnd As Long, flag As Boolean)
SetWindowPos WinhWnd, -2 - flag, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Property
If you want to make windowhandling easier, download my class at
http://www.geocities.com/despotez/WH/
Examples included!
-
Of course the x and y are for the coordinates of where u want to place the window according to your screen resolution or screen width! the Hwnd is a number that is like an identity for each window! The rest I don't know
-
This kind of thing is best explained in the MSDN library.
Click this smily: :rolleyes:
-
<?>