[轉載][VB.NET] ListBox 與 ListView 自動向下滾動

  • 945
  • 0
  • 2022-02-14

  在ListBox與ListView加入新項目後,自動向下滾動,保持元件中顯示最新的幾個項目。

  • ListBox
ListBox1.TopIndex = ListBox1.Items.Count - 1

 

  • ListView
ListView1.EnsureVisible(ListView1.Items.Count - 1)

轉載自:[VB.NET] Listbox 和 Listview 自動向下滾動 程式碼