隐藏任务栏代码

来源:互联网 发布:高仿淘宝网站模板下载 编辑:程序博客网 时间:2024/04/30 02:04

Declare   Function   FindWindow   Lib   "user32"   Alias   "FindWindowA"   (ByVal   lpClassName   As   String,   _  
              ByVal   lpWindowName   As   String)   As   IntPtr  
   
          Declare   Function   ShowWindow   Lib   "User32"   (ByVal   hWnd   As   IntPtr,   ByVal   nCmdShow   As   Integer)   As   Integer  
   
          Const   SW_HIDE   =   0  
          Const   SW_SHOW   =   5  
   
         
          Private   Sub   Button1_Click(ByVal   sender   As   System.Object,   ByVal   e   As   System.EventArgs)   Handles   Button1.Click  
                  ShowWindow(FindWindow("Shell_TrayWnd",   Nothing),   SW_HIDE)       'HIDE    
                  ShowWindow(FindWindow("Shell_TrayWnd",   Nothing),   SW_SHOW)       'SHOW  
          End   Sub