16,721
社区成员




Private Sub SetAutoScrollMargins()
If (TextBox1.Location.X > Panel1.Location.X) Or
(TextBox1.Location.Y > Panel1.Location.Y) Then
Panel1.AutoScroll = True
If (Panel1.AutoScrollMargin.Width < 5) Or
(Panel1.AutoScrollMargin.Height < 5) Then
'Panel1.SetAutoScrollMargin(5, 5)
Panel1.AutoScrollMargin = New Size(5, 5)
'Panel1.AutoScrollMargin.Width = 5 '这个赋值是错误的 可能作者设计时没声明好
End If
End If
End Sub