VB程序中的怎样用滚动条改变窗体大小
展开全部
Private Sub Form_Load()
HScroll1.Min = 1680
HScroll1.Max = Screen.Width
HScroll1.Value = HScroll1.Max / 2
HScroll1.LargeChange = 90
VScroll1.Min = 405
VScroll1.Max = Screen.Height
VScroll1.Value = VScroll1.Max / 2
VScroll1.LargeChange = 90
End Sub
Private Sub HScroll1_Scroll()
Me.Move Left, Top, HScroll1.Value, VScroll1.Value
End Sub
Private Sub VScroll1_Scroll()
Me.Move Left, Top, HScroll1.Value, VScroll1.Value
End Sub
HScroll1.Min = 1680
HScroll1.Max = Screen.Width
HScroll1.Value = HScroll1.Max / 2
HScroll1.LargeChange = 90
VScroll1.Min = 405
VScroll1.Max = Screen.Height
VScroll1.Value = VScroll1.Max / 2
VScroll1.LargeChange = 90
End Sub
Private Sub HScroll1_Scroll()
Me.Move Left, Top, HScroll1.Value, VScroll1.Value
End Sub
Private Sub VScroll1_Scroll()
Me.Move Left, Top, HScroll1.Value, VScroll1.Value
End Sub
参考资料: VB探讨超级群 48029944
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
With HScroll1
.Min = 1680
.Max = Screen.Width
.Value = Me.Width
.LargeChange = 90
.Left = 0
.Top = 0
.Width = Me.Width - 100
End With
With VScroll1
.Min = 405
.Max = Screen.Height
.Height = Me.Height - 100
.Value = Me.Height
.LargeChange = 90
.Left = 0
.Top = HScroll1.Height
End With
.Min = 1680
.Max = Screen.Width
.Value = Me.Width
.LargeChange = 90
.Left = 0
.Top = 0
.Width = Me.Width - 100
End With
With VScroll1
.Min = 405
.Max = Screen.Height
.Height = Me.Height - 100
.Value = Me.Height
.LargeChange = 90
.Left = 0
.Top = HScroll1.Height
End With
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询