Case 1: SendMessage Me.hwnd, WM_SETTEXT, 0, ByVal CStr(Text1.Text)'设置窗体的Caption,由于Text1.text属于Variant类型,所以一定先要用CStr把它转换成字符串 Case 2: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&'窗体最大化 Case 3: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZ...
Case 1: SendMessage Me.hwnd, WM_SETTEXT, 0, ByVal CStr(Text1.Text)'设置窗体的Caption,由于Text1.text属于Variant类型,所以一定先要用CStr把它转换成字符串 Case 2: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&'窗体最大化 Case 3: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZ...
SC_ZOOM = SC_MAXIMIZE, } 于是有了下面的调用: private const uint WM_SYSCOMMAND = 0x0112; private const uint SC_MONITORPOWER = 0xF170; //关闭 SendMessage(this.Handle,WM_SYSCOMMAND , (IntPtr)SC_MONITORPOWER,2); //打开 SendMessage(this.Handle,WM_SYSCOMMAND , (IntPtr)SC_MONITORPOWER,-1);...
Case 1: SendMessage Me.hwnd, WM_SETTEXT, 0, ByVal CStr(Text1.Text)'设置窗体的Caption,由于Text1.text属于Variant类型,所以一定先要用CStr把它转换成字符串Case 2: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&'窗体较大化Case 3: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZE,...
Case 2: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&'窗体最大化 Case 3: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, ByVal 0&'窗体最小化 Case 4: SendMessage Me.hwnd, WM_SYSCOMMAND, SC_RESTORE, ByVal 0&'窗体恢复原来的大小 Case 5: SendMessage Me.hwnd, WM_SYSCOMM...
Public Const SC_MAXIMIZE = &HF030 '最大化窗体 Public Const SC_RESTORE = &HF120 '恢复窗体大小 Public Const WM_SETTEXT = &HC '设置窗体的Caption Public Const WM_GETTEXT = &HD '取得窗体的caption Private Sub Command_Click(Index As Integer) Dim S As String S = String(80, Chr(0)) Selec...
SendMessage(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); // 最大化 SendMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); // 最小化 SendMessage(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); // 关闭
Public Const SC_MAXIMIZE = &HF030 '最大化窗体Public Const SC_RESTORE = &HF120 '恢复窗体大小Public Const WM_SETTEXT = &HC '设置窗体的CaptionPublic Const WM_GETTEXT = &HD '取得窗体的caption Private Sub Command_Click(Index As Integer)Dim S As StringS = String(80, Chr(0))Select Case ...
SendMessage(HWND, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&) '最大化 SendMessage HWND, WM_SHOWWINDOW, SW_HIDE, vbNull '隐藏窗体 SendMessage HWND, WM_SHOWWINDOW, SW_NORMAL, vbNull '显示窗体 SendMessage(HWND, CB_SHOWDROPDOWN, -1, -1) '显示Combo1.hwnd下拉列表 ...
Public Const SC_MAXIMIZE = &HF030 '最大化窗体Public Const SC_RESTORE = &HF120 '恢复窗体大小窗体,Hwnd是记事本的,me.hwnd是自己的SendMessage Hwnd, 2, 0, 0 '有效,记事本被关闭,返回0,err.lastdllerr=0SendMessage Hwnd , WM_SYSCOMMAND, SC_CLOSE, ByVal 0&'无效,返回0,err.lastdllerr=0...