|
-
Jun 27th, 2001, 09:54 PM
#1
Thread Starter
Addicted Member
maximize form using sendmessage api?
im trying to maximize my form using the sendmessage api, i know i can do it by just chaning the windows state, but im looking for the way to do it using the sendmessage api
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_SIZE = &H5
Private Sub Command1_Click()
SendMessage Me.hwnd, WM_SIZE, 2, 0
End Sub
for some reason this wont work, using the WM_SIZE has the wParam 2 is = to maximizing
-
Jun 28th, 2001, 01:02 AM
#2
Quick, delete this, you already found out the answer in your other thread .
2 = Minimized
3 = Maximized
VB Code:
Private Declare Function ShowWindow Lib "user32.dll" (ByVal _
hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
ShowWindow Me.hwnd, 3
End Sub
You could just as easily use the WindowState property without any API at all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|