RT,C#是否能实现类似功能,具体有哪些方法

解决方案 »

  1.   

    首先一定要加using   System.Runtime.InteropServices;   
        
      private   const   int   SW_HIDE=0;   
      private   const   int   SW_SHOW=5;   
        
        
      
      ///   <summary>   
      ///   查找窗口   
      ///   </summary>   
      [DllImport("user32.dll")]   
      internal   static   extern   IntPtr   FindWindow(string   lpClassName,   string   lpWindowName);   
        
      [DllImport("user32.dll")]   
      internal   static   extern   int   ShowWindow(IntPtr   hWin,   int   nCmdShow);//这里第一个参数必须是IntPtr型的   
        
      private   bool   b=true;   
        
      private   void   button4_Click(object   sender,   System.EventArgs   e)   
      {   
      if(b)   
      ShowWindow(FindWindow("Shell_TrayWnd",   null),   SW_HIDE);   
      else   
      ShowWindow(FindWindow("Shell_TrayWnd",   null),   SW_SHOW);   
      b=!b;   
      }   
      

  2.   

    对  楼上说的 form的一个属性
      

  3.   

    你的问题有点模糊
    如果只是不想窗体的任务栏上显示的话就用3楼的方法ShowInTaskbar = false//false了就不显示
    如果是想程序启动的时候自动的把任务栏隐藏了就用1楼的,调用API来实现using  System.Runtime.InteropServices;  
        
      private  const  int  SW_HIDE=0;  
      private  const  int  SW_SHOW=5; 
    [DllImport("user32.dll")]  
      internal  static  extern  IntPtr  FindWindow(string  lpClassName,  string  lpWindowName);  
        
      [DllImport("user32.dll")]  
      internal  static  extern  int  ShowWindow(IntPtr  hWin,  int  nCmdShow);在Page_Load的事件中写
     ShowWindow(FindWindow("Shell_TrayWnd",  null),  SW_HIDE);  
    这样程序启动了任务栏就自动隐藏了
      

  4.   

    SHAppBarMessage
    ABM_SETAUTOHIDEBAR