soriega
asked on
Move window without resize
Hi. I am trying to move a window to the upper left corner of my screen. I seem to have no problem moving the window to the corner , but it becomes very very small no matter what I set as nWidth & nHeight. The window i am moving is a "no resizeable" window, and i simply want it in the corner and nothing else.
Declare Function MoveWindow Lib "user32.dll" Alias _
"MoveWindow" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Declare Function MoveWindow Lib "user32.dll" Alias _
"MoveWindow" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
ASKER
Not really, i want to move another window, Not the Form of my application. Is there some way of using this method with the hwnd ?
I thought this was useful
Declare Function MoveWindow Lib "user32.dll" Alias _
"MoveWindow" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
This one seem to work, but it becomes very small, and it can after then only be closed
I thought this was useful
Declare Function MoveWindow Lib "user32.dll" Alias _
"MoveWindow" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
This one seem to work, but it becomes very small, and it can after then only be closed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim frm As New Form1
frm.Location = New Point(Me.Left + 200, Me.Top + 100)
frm.Show()