- Public Function ListView_AddProgressBar(ByRef pListView As System.Windows.Forms.ListView, ByVal ListViewItemIndex As Integer, ByVal ColumnIndex As Integer) As System.Windows.Forms.ProgressBar
- Dim r As Rectangle
- Dim pb As New System.Windows.Forms.ProgressBar
-
- r = pListView.Items(ListViewItemIndex).Bounds()
- r.Width = pListView.Columns(ColumnIndex).Width
- If ColumnIndex > 0 Then
- r.X = r.X + pListView.Columns(ColumnIndex - 1).Width
- End If
- pb.Parent = pListView
- pb.SetBounds(r.X, r.Y, r.Width, r.Height)
- pb.Visible = True
-
- Return pb
- End Function
Public Function ListView_AddProgressBar(ByRef pListView As System.Windows.Forms.ListView, ByVal ListViewItemIndex As Integer, ByVal ColumnIndex As Integer) As System.Windows.Forms.ProgressBar
Dim r As Rectangle
Dim pb As New System.Windows.Forms.ProgressBar
r = pListView.Items(ListViewItemIndex).Bounds()
r.Width = pListView.Columns(ColumnIndex).Width
If ColumnIndex > 0 Then
r.X = r.X + pListView.Columns(ColumnIndex - 1).Width
End If
pb.Parent = pListView
pb.SetBounds(r.X, r.Y, r.Width, r.Height)
pb.Visible = True
Return pb
End Function