as of now I am able to do this from a separate event,
here is the code I am using:
Private Sub ListView1_DrawSubItem(sender As Object, e As System.Windows.Forms.DrawListViewSubItemEventArgs) Handles ListView1.DrawSubItem
With e.Graphics
.DrawLines(New Pen(SystemColors.ButtonShadow), New Point() {New Point(e.Bounds.Left, e.Bounds.Top - 1), New Point(e.Bounds.Left + e.Bounds.Width, e.Bounds.Top - 1), New Point(e.Bounds.Left + e.Bounds.Width, e.Bounds.Top + e.Bounds.Height), New Point(e.Bounds.Left, e.Bounds.Top + e.Bounds.Height)})
End With
e.DrawText()
End Sub
The reason I am trying to get this over to the form_load event is that every time I call forth my listview1.click event the listview keeps flashing. However, I believe this may stop if this was drawn on listview permanently instead of being its own event being drawn every time.
What I have tried:
I tried using a creategraphics
here is the code I tried:
With CreateGraphics()
.DrawLines(New Pen(SystemColors.ButtonShadow), New Point() {New Point(ListView1.Bounds.Left, ListView1.Bounds.Top - 1), New Point(ListView1.Bounds.Left + ListView1.Bounds.Width, ListView1.Bounds.Top - 1), New Point(ListView1.Bounds.Left + ListView1.Bounds.Width, ListView1.Bounds.Top + ListView1.Bounds.Height), New Point(ListView1.Bounds.Left, ListView1.Bounds.Top + ListView1.Bounds.Height)})
End With
but it didn't work