我想了几个思路但自己不会实现,
1:获取我的窗口的父窗口(即桌面窗口)的所有其他窗口,然后一一设置值
2:捕捉windows底层的最大化消息,然后改变消息中的值
3:设置桌面屏幕工作区的大小
不晓得这些思路对不对,谁能给我说下正确的解决方法阿,我昨天起才开始学c#的,帮帮我这个可怜的c#菜鸟吧

解决方案 »

  1.   

    你是不是想使你的这个窗口永远在最前边啊?那样的话把窗体的TopMost属性设置为True就可以了
    ,如果要做到“那些最大化的窗口的边缘紧贴着我的窗口的边缘”就比较难了,而且也不美观。
      

  2.   

    你说的我都实现了,现在问题就是让其他窗口排列在我的窗口外面,就像windows桌面下面的工具栏你开的窗口的边框不会覆盖它,并且紧靠它的上面
      

  3.   

    是想把你的窗口做成像window任务栏那种效果吗?当然可以实现!
      

  4.   

    提示一下楼主: 用 WIndows API 函数: BOOL SystemParametersInfo(
      UINT uiAction,
      UINT uiParam,
      PVOID pvParam,
      UINT fWinIni
    );其中:uiAction = SPI_SETWORKAREA 
          pvParam = 一个RECT的指针,指示新的工作区矩形框
          其他参数忽略。MSDN注释: Sets the size of the work area. The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. The pvParam parameter is a pointer to a RECT structure that specifies the new work area rectangle, expressed in virtual screen coordinates. In a system with multiple display monitors, the function sets the work area of the monitor that contains the specified rectangle.
      

  5.   

    在c#中System.Windows.Forms.Screen.PrimaryScreen.WorkingArea 能不能设置哦
      

  6.   

    FJGoodGood(_FJ_强中强) 的代码我不知道怎么调用,能详细点吗,谢谢
      

  7.   

    zhongjy001(.)  这个东东叫taskbar我没找到,你知道在哪里吗,谢谢
      

  8.   

    我前几天在www.codeproject.com看到过这样的窗口。
      

  9.   

    把下列代码拷贝到你的程序里:
    using System.Runtime.InteropServices;        [DllImport("User32.dll", CharSet=CharSet.Auto)]
            public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref RECT param, uint fWinINI);        [StructLayout(LayoutKind.Sequential)]
                public struct RECT
            {
                public int left;
                public int top;
                public int right;
                public int bottom;
            }        const int SPI_SETWORKAREA = 0x002F;        void SetWorkintArea(int left, int top, int width, int height)
            {
                RECT rect = new RECT();
                rect.left = left;
                rect.top = top;
                rect.right = left+width;
                rect.bottom = top+height;
                SystemParametersInfo(SPI_SETWORKAREA, 0, ref rect, 0);
           }        private void button1_Click(object sender, System.EventArgs e)
            {
                SetWorkintArea(200, 0, 524, 740);
            }运行之后,你会看到窗口最大化后,限制在一定范围里了