MDI窗体高度的问题
刚遇到的一个诡异的问题。MDI窗口右侧有一个Picture作为容器,中间是TreeView,下面还有一个StatusBar由于编程和运行环境不同,我在加载MDI的时候,我根据屏幕修改TreeView的高度,代码如下。
Private Sub MDIForm_Load()
'Load FormBasicInfo
StatusBar1.Panels.Add
StatusBar1.Panels.Add
RefreshStatusBar
Picture1.Width = Screen.Width / 10 * 1.5
LoadTrees
End Sub
Sub LoadTrees()
For i = 1 To 200
Set Opnode = OperationTree.Nodes.Add(, , , " Test" & i)
Next i
For i = 1 To OperationTree.Nodes.Count
OperationTree.Nodes(i).Expanded = True
Next i
OperationTree.Appearance = cc3D
OperationTree.LabelEdit = 1
OperationTree.Height = Screen.Height - MDIForm1.ScaleHeight - StatusBar1.Height
OperationTree.Width = Picture1.ScaleWidth
OperationTree.Top = 0
OperationTree.Left = 0
OperationTree.Scroll = True
End Sub
问题出来了,我上次运行之后是正常的,但是现在运行发现下面有一块空白,也就是TreeView高度不够。
更为诡异的是,我家中断点调试的话,结果又是正常的。。。。。我都不知道如何查问题调试了