窗体的打开大小能自适应吗?该怎么做?
我编了一个程序,编完后显示时,有一些东西由于窗体不够大显示不上,如果设为最大化又有一部分是空的,太难看了!
请教有没有自适应改变窗口大小的办法?
小弟比较菜(麻烦说的详细一点)
谢谢!!
Private Sub Form_load()
Dim mtop As Integer, i As Integer, j As Integer, mleft As Integer
mtop = 0
For i = 1 To 8
mleft = 50
For j = 1 To 8
k = (i - 1) * 8 + j
Load Label1(k)
Label1(k).BackColor = IIf((i + j) Mod 2 = 0, QBColor(0), QBColor(15))
Label1(k).Visible = True
Label1(k).Top = mtop
Label1(k).Left = mleft
mleft = mleft + Label1(0).Width
Next j
mtop = mtop + Label1(0).Height
Next i
End Sub
Private Sub Label1_Click(index As Integer)
Dim tag As Boolean
Label1(index) = index
For i = 1 To 8
For j = 1 To 8
k = (i - 1) * 8 + j
If Label1(k).BackColor = &H0& Then
Label1(k).BackColor = &HFFFFFF
Else
Label1(k).BackColor = &H0&
End If
Next j
Next i
End Sub
上面是源程序,不知道该怎么改
resize知道,但是还不会用,版主的那一段我直接加上去了,没有什么变化