要讓捲軸回到上面
程式與結果擷圖
-------------------------------------------------------------------------------------Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.AutoScroll = True
'Me.Height * 2 的地方新增一個 Button
Dim btnBotton As New Button
Me.Controls.Add(btnBotton)
btnBotton.Location = New Point(0, Me.Height * 2)
'表單 0, 0 新增一個無名的 Label 並 Focus
Dim lblTop As New Label
Me.Controls.Add(lblTop)
lblTop.Location = New Point(0, 0)
lblTop.Focus()
End Sub
End Class
沒有留言:
張貼留言