请高手帮忙,关于窗口大小设置
我想做一个类似迅雷的悬浮窗口,设置窗口的formBorderStyle属性为None(无标题栏模式),调整窗口大小至50×50像素大小,但运行时显示的窗体横向变长了,所见并非所得,以前没做过这么小的窗体,不知道是什么原因,请高手指教!
private void 开始下载ToolStripMenuItem_Click(object sender, EventArgs e) { flyWnd downFlyWnd = new flyWnd(); downFlyWnd.SizeChanged += new EventHandler(downFlyWnd_SizeChanged); downFlyWnd.MdiParent = this; downFlyWnd.Show(); } private void downFlyWnd_SizeChanged(object sender, EventArgs e) { (sender as Form).Size = new Size( 50, 50); }
private void 开始下载ToolStripMenuItem_Click(object sender, EventArgs e) { flyWnd downFlyWnd = new flyWnd(); downFlyWnd.MdiParent = this; downFlyWnd.Show(); downFlyWnd.Size = new Size(50, 50); downFlyWnd.Location = new Point(100, 100); }