我是初学者。我想问问我如何能将面板集中在所有决议中。我有面板,其中包括其他面板和其称为ParentPanel。我已经tryed添加到设计这个东西如何为所有分辨率的面板居中
ParentPanel.Location = new Point(
this.ClientSize.Width/2 - ParentPanel.Size.Width/2,
this.ClientSize.Height/2 - ParentPanel.Size.Height/2);
ParentPanel.Anchor = AnchorStyles.None;
,但它说:namescape的“点”式找不到,所以我用帮助它改变New point
到New System.Drawing.Point
但它仍然没有工作:/
我的表单是全屏的,它的大小不是这样,WindowsState是Maximazed,StartPosition是CenterScreen。
你能帮助我吗?
欢迎来到StackOverflow!请参阅[“应该在其标题中包含”标签“?”](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles),其中的共识是“不,他们不应该”。 – 2014-12-02 15:26:46
看到这个答案: http://stackoverflow.com/questions/491399/c-centering-controls-within-a-form-in-net-winforms – 2014-12-02 15:33:42