Home > Software engineering >  Using VB to SendMessage send WM_SIZE
Using VB to SendMessage send WM_SIZE

Time:10-11

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=(& amp; H5)
Private Sub Command1_Click ()
Dim x As Long
'to set the widthDim y As Long 'to set the height of the
X=400
Y=300
SendMessage HWND WM_SIZE, (1), (2)
End Sub

(1)=
(2)=
If you want to add process, please process,

CodePudding user response:

SendMessage HWND WM_SIZE, SIZE_RESTORED, x + y * 32768

(SIZE_RESTORED=0)
  •  Tags:  
  • API
  • Related