如何隐藏桌面上的那个工具栏? 用API函数FindWindow("Shell_TrayWnd",null);找到任务栏然后用API函数ShowWindow(hWnd ,SW_HIDE)隐藏. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用findwindow找到任务栏句柄,然后SetWindowPos来隐藏和显示。[DllImport("user32.dll")]public static extern int FindWindow( string lpClassName, // class name string lpWindowName // window name ); [DllImport("user32.dll")]public static extern bool SetWindowPos( int hWnd, // handle to window int hWndInsertAfter, // placement-order handle short X, // horizontal position short Y, // vertical position short cx, // width short cy, // height uint uFlags // window-positioning options ); private const int SWP_HIDEWINDOW = 0x80; private const int SWP_SHOWWINDOW = 0x40; SetWindowPos(TaskBarHwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW); //这是隐藏SetWindowPos(TaskBarHwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW); //这是显示具体调用自己写吧。 int TaskBarHwnd; TaskBarHwnd = FindWindow("Shell_traywnd", ""); 可以试试看将 WindowState属性设成Maximized FormBorderStyle属性设成None IntPtr wnd = FindWindow("Shell_TrayWnd",NULL);if(wnd) { ShowWindow(wnd,SW_SHOW); } 写错了,应该是if(wnd != IntPtr.Zero) ZedGraph控件关于坐标的问题 关于 RegisterStartupScript 弹出对话框问题~ 谢谢 c# 编辑器设置 哪里可以下载 word 9.0.dll?急 高手进来,正则表达式字符替换问题! sql中日期查询问题 网页中如下内容,如何用程序去点击? 如何在添加记录的时候使一个字段的值等于主键ID(自动递增)的值呢? 关于窗体编程中的激发事件的方法 大量开发图书资料下载 偶想用C#做一个聊天软件类似msn的请高手指教 哪儿有 CHS 格式帮助文件的编写器下载?
string lpClassName, // class name
string lpWindowName // window name
); [DllImport("user32.dll")]public static extern bool SetWindowPos(
int hWnd, // handle to window
int hWndInsertAfter, // placement-order handle
short X, // horizontal position
short Y, // vertical position
short cx, // width
short cy, // height
uint uFlags // window-positioning options
);
private const int SWP_HIDEWINDOW = 0x80;
private const int SWP_SHOWWINDOW = 0x40;
SetWindowPos(TaskBarHwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW); //这是隐藏
SetWindowPos(TaskBarHwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW); //这是显示具体调用自己写吧。
int TaskBarHwnd;
TaskBarHwnd = FindWindow("Shell_traywnd", "");
FormBorderStyle属性设成None
if(wnd)
{
ShowWindow(wnd,SW_SHOW);
}