| 发表于:2007-01-10 12:22:315楼 得分:95 |
调用api来控制任务栏显示和隐藏。 [dllimport( "user32.dll ")] public static extern intptr findwindowex(intptr ph, intptr ch, string cn, string wn); [dllimport( "user32.dll ")] public static extern bool showwindow(intptr hwnd, long ncmdshow ); intptr handle = findwindowexintptr.zero,intptr.zero, "shell_traywnd ",null); showwindow(handle,0);//隐藏任务栏,获取显示屏的大小,再把窗体设置为显示屏的大小即可 intptr handle = findwindowex(intptr.zero,intptr.zero, "shell_traywnd ",null); showwindow(handle,1);//显示任务栏 | | |
|