SendMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); // 最小化 SendMessage(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); // 关闭
SC_ICON = SC_MINIMIZE, 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 , (Int...
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_MINIMI...
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_MINIMI...
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...
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...
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_SYSCOMMAND,...
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_SYSCOMMAND, SC_CLOSE, ByVal 0&'关闭窗体End SelectEnd Sub 11.文本垂直居中: 实现这个效果...
Public Const SC_CLOSE = &HF060 '关闭窗体 Public Const SC_MINIMIZE = &HF020 '最小化窗体 Public Const SC_MAXIMIZE = &HF030 '最大化窗体 Public Const SC_RESTORE = &HF120 '恢复窗体大小 Public Const WM_SETTEXT = &HC '设置窗体的Caption ...
SendMessage(HWND, WM_SYSCOMMAND, SC_CLOSE, ByVal 0&) '关闭 SendMessage(HWND, WM_SYSCOMMAND, SC_MINIMIZE, ByVal 0&) '最小化 SendMessage(HWND, WM_PASTE, 0, 0) '粘贴 SendMessage(HWND, WM_COPY, 0, 0) '复制 SendMessage(HWND, WM_UNDO, 0, 0) '撤消 ...