C#模擬窗體系統選單
using System.Runtime.InteropServices;
const uint TPM_LEFTBUTTON = 0;
const uint TPM_RIGHTBUTTON = 2;
const uint TPM_LEFTALIGN = 0;
const uint TPM_CENTERALIGN = 4;
const uint TPM_RIGHTALIGN = 8;
const uint TPM_TOPALIGN = 0;
const uint TPM_VCENTERALIGN = 0x10;
const uint TPM_BOTTOMALIGN = 0x20;
const uint TPM_RETURNCMD = 0x100;
const uint WM_SYSCOMMAND = 0x0112;
DllImport
private void button1_Click(object sender, EventArgs e)
{
Point vPoint;
Rectangle vRect;
GetCursorPos(out vPoint);
SendMessage(Handle, WM_SYSCOMMAND, TrackPopupMenu(
GetSystemMenu(Handle, false),
TPM_RETURNCMD | TPM_LEFTBUTTON, vPoint.X, vPoint.Y,
0, Handle, out vRect), 0);
}
const uint TPM_LEFTBUTTON = 0;
const uint TPM_RIGHTBUTTON = 2;
const uint TPM_LEFTALIGN = 0;
const uint TPM_CENTERALIGN = 4;
const uint TPM_RIGHTALIGN = 8;
const uint TPM_TOPALIGN = 0;
const uint TPM_VCENTERALIGN = 0x10;
const uint TPM_BOTTOMALIGN = 0x20;
const uint TPM_RETURNCMD = 0x100;
const uint WM_SYSCOMMAND = 0x0112;
DllImport
private void button1_Click(object sender, EventArgs e)
{
Point vPoint;
Rectangle vRect;
GetCursorPos(out vPoint);
SendMessage(Handle, WM_SYSCOMMAND, TrackPopupMenu(
GetSystemMenu(Handle, false),
TPM_RETURNCMD | TPM_LEFTBUTTON, vPoint.X, vPoint.Y,
0, Handle, out vRect), 0);
}
相關文章
- PID除錯軟體(C#、模擬、模擬)除錯C#
- C# Post 模擬表單提交C#
- 右鍵模擬windows選單Windows
- 模擬select下拉選單詳解
- Gpssworld模擬(二):並排排隊系統模擬
- 高校學生資訊管理系統C#窗體版更新(一)C#
- 案例題-------銀行存取款系統(BSWS)軟體系統模擬
- 利用WReal加速系統模擬
- Qt 視窗強制禁用系統陰影(自定義選單)QT
- winform之在主窗體中不顯示子窗體的選單欄ORM
- c# form窗體C#ORM
- 模擬select下拉選單程式碼例項
- C# WinForm 父窗體 子窗體 傳值C#ORM
- 【Java】酒店管理系統的模擬Java
- 請教UML建立模擬系統
- Keil的軟體模擬和硬體模擬
- Adams— 系統級多體動力學模擬平臺
- C#窗體--滑鼠事件C#事件
- c# mdi多窗體C#
- 數字樣機:慣性導航系統控制單元模擬
- javascript模擬美化select下拉選單效果詳解JavaScript
- 模擬美化select下拉選單程式碼例項
- 純CSS模擬單選框和核取方塊CSS
- 基於C#的簡單登入窗體設計C#
- Web 模擬終端部落格系統Web
- web模擬終端部落格系統Web
- windows 系統模擬藍屏方法薦Windows
- JQuery模擬點選clickjQuery
- 有限元模擬 有限體積模擬
- 新增選單的視窗
- Windows系統使用Gazebo機器人模擬軟體和Cartographer(SLAM)Windows機器人SLAM
- SkyEye(一種軟體模擬的系統開發平臺)
- C# .NET 可靈活配置登入窗體、主窗體的快速資訊管理系統開發架構參考C#架構
- 模擬實現select下拉選單例項程式碼單例
- 模擬帶有滾動條的select下拉選單
- C#模擬登入總結C#
- c# 模擬網站登陸C#網站
- C#專案—模擬考試C#