在某form中有若干控件组合,本意想在函数Form_Load()和Form_Resize()中使用move方法使得控件移到合适的位置,这样界面比较美观。但出现如下问题,请教各位高手原因。1、
根据控件间的关系数据进行移动时,运行后的界面总是很混乱,并没有像预想的那样排列整齐。下面是相关代码: famctl.Move picCtl.Width + 50, tlbCtl.Height, Me.ScaleWidth - picCtl.Width - 50, Me.ScaleHeight - tlbCtl.Height
tabctl.Move picCtl.Width + 50, tlbCtl.Height, famctl.Width, famctl.Height - 1500
famcx.Move picCtl.Width + 50, tlbCtl.Height + tabctl.Height, famctl.Width, 1500其中famctl为包含很多控件的Frame;tlbCtl为famctl上方的Toolbar;picCtl为famctl左边的PictureBox;tabctl为famctl内部的TabStrip;
famcx为famctl内部且在tabctl下方的Frame。这三个语句在函数Form_Load()和Form_Resize()中都有2、
上述方式无效后,改为根据固定坐标移动,水平方向显示没问题了,但是垂直方向的显示和1、一样,没有任何变化
famctl.Move 800, 0, Me.ScaleWidth - picCtl.Width - 50, Me.ScaleHeight - tlbCtl.Height
tabctl.Move 800, 0, famctl.Width - 50, famctl.Height - 1500
famcx.Move 800, tabctl.Height, famctl.Width, 1500
如何才能解决此问题,使得界面显示正常?
根据控件间的关系数据进行移动时,运行后的界面总是很混乱,并没有像预想的那样排列整齐。下面是相关代码: famctl.Move picCtl.Width + 50, tlbCtl.Height, Me.ScaleWidth - picCtl.Width - 50, Me.ScaleHeight - tlbCtl.Height
tabctl.Move picCtl.Width + 50, tlbCtl.Height, famctl.Width, famctl.Height - 1500
famcx.Move picCtl.Width + 50, tlbCtl.Height + tabctl.Height, famctl.Width, 1500其中famctl为包含很多控件的Frame;tlbCtl为famctl上方的Toolbar;picCtl为famctl左边的PictureBox;tabctl为famctl内部的TabStrip;
famcx为famctl内部且在tabctl下方的Frame。这三个语句在函数Form_Load()和Form_Resize()中都有2、
上述方式无效后,改为根据固定坐标移动,水平方向显示没问题了,但是垂直方向的显示和1、一样,没有任何变化
famctl.Move 800, 0, Me.ScaleWidth - picCtl.Width - 50, Me.ScaleHeight - tlbCtl.Height
tabctl.Move 800, 0, famctl.Width - 50, famctl.Height - 1500
famcx.Move 800, tabctl.Height, famctl.Width, 1500
如何才能解决此问题,使得界面显示正常?
.scalewidth与width是不同的