トピックに関するいくつかの調査を行い、解決策を見つけました。 同じ質問の他の人のためにここに置いておきます。
'======================================
'TreeView Location Change with Scroll
Private Sub Form2_Scroll(sender As Object, e As ScrollEventArgs) Handles MyBase.Scroll
'Gets the vertical scroll values as an Integer
Dim verticalscroll As Integer = AutoScrollPosition.Y * -1
'Moves the Treeview to new location
EstimTree.Location = New Point(5, verticalscroll)
'If statement to contain the treeview within my form
If EstimTree.Location.Y <= 130 Then
EstimTree.Location = New Point(5, 130)
End If
End Sub
私はあなたの質問をしませんでした。なぜそれをする必要がありますか?私が知っている限り、 'treeview'はデータが' treeview'のサイズから飛び出すたびに 'scroll bar'を作成します。あなたは' form'の底にもコントロールを持っていますか?そのため、 'scrollbar'があり、' scrollbar'に基づいて 'treeview'の中でデータを移動するように頼んでいます。 –
はい、あなたはデータがサイズからバウンスするたびに、スクロールバーを作るでしょう。しかし、私は下部に向かってより多くのコントロールがあるので、スクロールで下に移動するためにツリービュー全体を必要とします。ありがとうございます – devN
私の推測は正しいです、私はそれを把握しようとします。 BRB –