topmost设为true;
windowstate设为maximized;
然后formborderstyle设为none
这些我都做了 任务栏还是在 怎么办啊 ~~~~

解决方案 »

  1.   


                ShowIcon = false;
                ShowInTaskbar = false;
      

  2.   

    不使用Windowstate   this.TopMost = true;
                this.Location = new Point(0, 0);
                this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
      

  3.   

    可以调用系统api但是我不会 请问有高人吗?谢谢了
      

  4.   

    this.FormBorderStyle = FormBorderStyle.None;
    this.WindowState = FormWindowState.Maximized;要注意代码的顺序
      

  5.   

    要先执行this.FormBorderStyle = FormBorderStyle.None; 再最大化。
      

  6.   


        using System.Runtime.InteropServices;    public class TaskBar 
        { 
            [DllImport("user32.dll", EntryPoint = "FindWindowA")] 
            private static extern IntPtr FindWindowA(string lp1, string lp2); 
            [DllImport("user32.dll", EntryPoint = "ShowWindow")] 
            private static extern IntPtr ShowWindow(IntPtr hWnd, int _value); 
            [DllImport("shell32.dll")] 
            private static extern int SHAppBarMessage(int dwMessage, ref APPBARDATA pData);         const int ABS_AUTOHIDE = 1; 
            const int ABS_ONTOP = 2; 
            const int ABM_SETSTATE = 10;         static TaskBar() 
            { 
            }         //显示任务栏 
            public static void Show() 
            { 
                IntPtr hTray = FindWindowA("Shell_TrayWnd", string.Empty); 
                ShowWindow(hTray, 5); 
            }         //隐藏任务栏 
            public static void Hide() 
            { 
                IntPtr hTray = FindWindowA("Shell_TrayWnd", string.Empty); 
                ShowWindow(hTray, 0); 
            }         //设置自动隐藏 
            public static bool AutoHide 
            { 
                set 
                { 
                    APPBARDATA abd = new APPBARDATA(); 
                    abd.hwnd = FindWindowA("Shell_TrayWnd", string.Empty); 
                    if (value) 
                    { 
                        abd.lParam = ABS_AUTOHIDE | ABS_ONTOP; 
                        SHAppBarMessage(ABM_SETSTATE, ref abd); 
                    } 
                    else 
                    { 
                        abd.lParam = ABS_ONTOP; 
                        SHAppBarMessage(ABM_SETSTATE, ref abd); 
                    } 
                } 
            }         struct APPBARDATA 
            { 
                public int cbSize; 
                public IntPtr hwnd; 
                public int uCallbackMessage; 
                public int uEdge; 
                public RECT rc; 
                public int lParam; 
            } 
            struct RECT 
            { 
                public int Left; 
                public int Top; 
                public int Right; 
                public int Bottom; 
            } 
        }上面是我写的一个控制任务栏的类。如果你想强行隐藏任务栏,可以调用TaskBar.Hide()方法强行隐藏,需要时再调用TaskBar.Show()显示。
      

  7.   

            public frmSearchMain()
            {
                InitializeComponent();            this.FormBorderStyle = FormBorderStyle.None;
                this.WindowState = FormWindowState.Maximized; 
            }
      

  8.   

    学习[align=center]****************************************************************
                今天回帖带祝福,七夕情人节快乐~^_^
    ****************************************************************[/align]
      

  9.   

    楼上好强啊[align=center]****************************************************************
                今天回帖带祝福,七夕情人节快乐~^_^
    ****************************************************************[/align]
      

  10.   

     this.TopMost = true; 
                this.Location = new Point(0, 0); 
                this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
    放到Load事件里不行吗?
      

  11.   


        public class TaskBar
        {
            [DllImport("user32.dll", EntryPoint = "FindWindowA")]
            private static extern IntPtr FindWindowA(string lp1, string lp2);
            [DllImport("user32.dll", EntryPoint = "ShowWindow")]
            private static extern IntPtr ShowWindow(IntPtr hWnd, int _value);
            [DllImport("shell32.dll")]
            private static extern int SHAppBarMessage(int dwMessage, ref APPBARDATA pData);        const int ABS_NOTONTOP = 0;
            const int ABS_AUTOHIDE = 1;
            const int ABS_ONTOP = 2;
            const int ABM_SETSTATE = 10;        static TaskBar()
            {
            }        //显示任务栏 
            public static void Show()
            {
                IntPtr hTray = FindWindowA("Shell_TrayWnd", string.Empty);
                ShowWindow(hTray, 5);
            }        //隐藏任务栏 
            public static void Hide()
            {
                IntPtr hTray = FindWindowA("Shell_TrayWnd", string.Empty);
                ShowWindow(hTray, 0);
            }        //设置自动隐藏 
            public static bool AutoHide
            {
                set
                {
                    APPBARDATA abd = new APPBARDATA();
                    abd.hwnd = FindWindowA("Shell_TrayWnd", string.Empty);
                    if (value)
                    {
                        abd.lParam = ABS_AUTOHIDE | ABS_ONTOP;
                        SHAppBarMessage(ABM_SETSTATE, ref abd);
                    }
                    else
                    {
                        abd.lParam = ABS_ONTOP;
                        SHAppBarMessage(ABM_SETSTATE, ref abd);
                    }
                }
            }        //设置任务栏置顶 
            public static bool TopMost
            {
                set
                {
                    APPBARDATA abd = new APPBARDATA();
                    abd.hwnd = FindWindowA("Shell_TrayWnd", string.Empty);
                    if (value)
                    {
                        abd.lParam = ABS_ONTOP;
                        SHAppBarMessage(ABM_SETSTATE, ref abd);
                    }
                    else
                    {
                        abd.lParam = ABS_NOTONTOP;
                        SHAppBarMessage(ABM_SETSTATE, ref abd);
                    }
                }
            }        struct APPBARDATA
            {
                public int cbSize;
                public IntPtr hwnd;
                public int uCallbackMessage;
                public int uEdge;
                public RECT rc;
                public int lParam;
            }
            struct RECT
            {
                public int Left;
                public int Top;
                public int Right;
                public int Bottom;
            }
        } 
    给刚刚的任务栏控制类加了个TopMost属性。只要设置任务栏的TopMost为false,任何窗口都不用设置this.FormBorderStyle = FormBorderStyle.None;就可以覆盖任务栏了。需要时,再设置回来。
    TaskBar.TopMost = false;
      

  12.   


    这位兄台,我是试过的。
    this.FormBorderStyle = FormBorderStyle.None; 
    this.WindowState = FormWindowState.Maximized; 
    这两句在我本机测试没有任何问题。
      

  13.   

    对了 那个写API的 麻烦了 但是 那个TaskBar.TopMost = false; 貌似点不到
      

  14.   

    /// <summary> 
            /// 设置全屏或取消全屏 
            /// </summary> 
            /// <param name="fullscreen">true:全屏 false:恢复 </param> 
            /// <param name="rectOld">设置的时候,此参数返回原始尺寸,恢复时用此参数设置恢复 </param> 
            /// <returns>设置结果 </returns> 
            public static bool SetFullScreen(bool fullscreen, ref Rectangle rectOld) 
            { 
                int Hwnd = 0; 
                Hwnd = Win32API.FindWindow("HHTaskBar", null); 
                if (Hwnd == 0) return false; 
                if (fullscreen) 
                { 
                    Win32API.ShowWindow(Hwnd, Win32API.SW_HIDE); 
                    Rectangle rectFull = Screen.PrimaryScreen.Bounds; 
                    Win32API.SystemParametersInfo(Win32API.SPI_GETWORKAREA, 0, ref rectOld, Win32API.SPIF_UPDATEINIFILE);//get 
                    Win32API.SystemParametersInfo(Win32API.SPI_SETWORKAREA, 0, ref rectFull, Win32API.SPIF_UPDATEINIFILE);//set 
                } 
                else 
                { 
                    Win32API.ShowWindow(Hwnd, Win32API.SW_SHOW); 
                    Win32API.SystemParametersInfo(Win32API.SPI_SETWORKAREA, 0, ref rectOld, Win32API.SPIF_UPDATEINIFILE); 
                } 
                return true; 
            } //所用到的API声明 
    [DllImport("coredll.dll", EntryPoint = "FindWindow")] 
    private static extern int FindWindow(string lpWindowName, string lpClassName); 
    [DllImport("coredll.dll", EntryPoint = "SystemParametersInfo")] 
    private static extern int SystemParametersInfo( 
            int uAction, 
            int uParam, 
            ref Rectangle lpvParam, 
            int fuWinIni 
            ); 
    public const int SPI_SETWORKAREA = 47; 
    public const int SPI_GETWORKAREA = 48;
      

  15.   


    /// <summary> 
            /// 设置全屏或取消全屏 
            /// </summary> 
            /// <param name="fullscreen">true:全屏 false:恢复 </param> 
            /// <param name="rectOld">设置的时候,此参数返回原始尺寸,恢复时用此参数设置恢复 </param> 
            /// <returns>设置结果 </returns> 
            public static bool SetFullScreen(bool fullscreen, ref Rectangle rectOld) 
            { 
                int Hwnd = 0; 
                Hwnd = Win32API.FindWindow("HHTaskBar", null); 
                if (Hwnd == 0) return false; 
                if (fullscreen) 
                { 
                    Win32API.ShowWindow(Hwnd, Win32API.SW_HIDE); 
                    Rectangle rectFull = Screen.PrimaryScreen.Bounds; 
                    Win32API.SystemParametersInfo(Win32API.SPI_GETWORKAREA, 0, ref rectOld, Win32API.SPIF_UPDATEINIFILE);//get 
                    Win32API.SystemParametersInfo(Win32API.SPI_SETWORKAREA, 0, ref rectFull, Win32API.SPIF_UPDATEINIFILE);//set 
                } 
                else 
                { 
                    Win32API.ShowWindow(Hwnd, Win32API.SW_SHOW); 
                    Win32API.SystemParametersInfo(Win32API.SPI_SETWORKAREA, 0, ref rectOld, Win32API.SPIF_UPDATEINIFILE); 
                } 
                return true; 
            } //所用到的API声明 
    [DllImport("coredll.dll", EntryPoint = "FindWindow")] 
    private static extern int FindWindow(string lpWindowName, string lpClassName); 
    [DllImport("coredll.dll", EntryPoint = "SystemParametersInfo")] 
    private static extern int SystemParametersInfo( 
            int uAction, 
            int uParam, 
            ref Rectangle lpvParam, 
            int fuWinIni 
            ); 
    public const int SPI_SETWORKAREA = 47; 
    public const int SPI_GETWORKAREA = 48;
      

  16.   

    http://topic.csdn.net/u/20081007/16/7e3c31c0-dda1-4149-850e-86705ce55de4.html?seed=474888684
      

  17.   

    this.TopMost = true;
    this.FormBorderStyle = FormBorderStyle.None;
    this.WindowState = FormWindowState.Maximized;经测试OK
      

  18.   

    this.FormBorderStyle = FormBorderStyle.None; 
    this.WindowState = FormWindowState.Maximized; 这个方法可行的,我也试过
      

  19.   

    this.Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
                this.Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
                this.Left = 0;
                this.Top = 0;
                this.TopMost = true;//以上代码写在Load里
      

  20.   

    噢,My God ,不可能吧...........
      

  21.   

    CMdiPaneDoc* CMdiPaneView::GetDocument() // non-debug version is inline
    {
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMdiPaneDoc)));
    return (CMdiPaneDoc*)m_pDocument;
    }
    #endif //_DEBUG
      

  22.   

    CMdiPaneDoc* CMdiPaneView::GetDocument() // non-debug version is inline
    {
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMdiPaneDoc)));
    return (CMdiPaneDoc*)m_pDocument;
    }
    #endif //_DEBUG