示例#1
0
        public void Run(Form frm)
        {
            var hSysMenu = SysMenu.FromForm(frm);

            hSysMenu.AppendSeparator();
            hSysMenu.AppendMenu(TECHSTAR_MSG + 0, "系统日志");
        }
示例#2
0
        //从一个Form对象检索一个新对象
        public static SysMenu FromForm(Form frm)
        {
            var cSysMenu = new SysMenu();

            cSysMenu.m_SysMenu = apiGetSystemMenu(frm.Handle, 0);
            if (cSysMenu.m_SysMenu == IntPtr.Zero)
            {
                // 一旦失败,引发一个异常
                throw new Exception("没有找到系统菜单");
            }
            return(cSysMenu);
        }
示例#3
0
 internal void ShowMainForm(IntPtr hwnd)
 {
     var flag = SysMenu.SendMessage(hwnd, WM_TECHSTAR_FORM, TECHSTAR_FORM, IntPtr.Zero);
 }