摘要: c# 里面隐藏了form 的边框,任务栏就没有了系统菜单。如何显示呢,看下文。调用方式 在form 构造函数 或者load中 TaskMenu.ShowSYSMENU(this);[DllImport("user32.dll" ,EntryPoint="GetWindowLong" ,CharSet=CharSet.Auto)]private static extern int GetWindowLong(HandleRefhWnd,int nIndex);[DllImport("user32.dll" ,EntryPoint=&qu 阅读全文
posted @ 2013-12-18 20:28 青田 阅读(1588) 评论(1) 推荐(0) 编辑
摘要: 问题提出:对于普通应用程序,我们很多时候会将窗口最小化到系统托盘。当我们点击这个托盘图标时,可能会弹出一些友好的提示界面,可以恰当的进行一些操作。一般情况下,我们可能粗暴的将这个友好提示界面放置在桌面的右下角,对于XP,这是OK的,因为XP不允许我们将任务栏拖动到桌面的上、左、右三个方向,只允许停靠下桌面的最下方,但是对于win7,我们便需要考虑到其它三个方向,再根据这个方向确定好提示界面放的位置。那么,如何获得任务栏的位置及相关信息?windows提供了相关和API进行操作。UINT_PTR SHAppBarMessage(DWORD dwMessage,PAPPBARDATA pData) 阅读全文
posted @ 2013-12-18 18:02 青田 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 不包含任务栏的屏幕尺寸 4 int width = System.Windows.Forms.SystemInformation.WorkingArea.Width; 5 int height = System.Windows.Forms.SystemInformation.WorkingArea.Height; 6 7 包括任务栏的屏幕尺寸 8 9 int width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;10 int height = System.Windows.Forms.Screen... 阅读全文
posted @ 2013-12-18 17:52 青田 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 1 [DefaultEvent("Load"), InitializationEvent("Load"), ComVisible(true), ClassInterface(ClassInterfaceType.AutoDispatch), ToolboxItemFilter("System.Windows.Forms.Control.TopLevel"), ToolboxItem(false), DesignTimeVisible(false), Designer("System.Windows.Forms.Design. 阅读全文
posted @ 2013-12-18 12:12 青田 阅读(1219) 评论(0) 推荐(0) 编辑