VB编程,我想在活动子窗体大小改变时让这个子窗体中的文本框大小跟着改变,请问该怎么做?
2个回答
展开全部
Private Sub Form_Load()
Text1.Tag = Text1.Left / Me.ScaleWidth & "|" & Text1.Top / Me.ScaleHeight & "|" & Text1.Width / Me.ScaleWidth & "|" & Text1.Height / Me.ScaleHeight
End Sub
Private Sub Form_Resize()
Dim k() As String
k = Split(Text1.Tage,"|")
Text1.Move Me.ScaleWidth * Val(k(0)), Me.ScaleHeight * Val(k(1)), Me.ScaleWidth * Val(k(2)), Me.ScaleHeight * Val(k(3))
End Sub
Text1.Tag = Text1.Left / Me.ScaleWidth & "|" & Text1.Top / Me.ScaleHeight & "|" & Text1.Width / Me.ScaleWidth & "|" & Text1.Height / Me.ScaleHeight
End Sub
Private Sub Form_Resize()
Dim k() As String
k = Split(Text1.Tage,"|")
Text1.Move Me.ScaleWidth * Val(k(0)), Me.ScaleHeight * Val(k(1)), Me.ScaleWidth * Val(k(2)), Me.ScaleHeight * Val(k(3))
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询