I remember in VB 6.0, I could draw a line. It really helped out with doing some GUI. But now it doesnt exist in .net and I really need it. Its too bad my version of 6.0 was only working model and i can't make stand-alone exes with it.
I've had my share of "fun" working with TreeView and I'm trying a different approach that uses a collection of buttons and one sub that handles all the click events. The problem here is that I want the button layout to LOOK like a TreeView control so I need to be able to draw some lines between the buttons.
I have already tried the following code:
Private Sub frmButton_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim pen As New Drawing.Pen(System.Drawing.Color.Black, 5)
Me.CreateGraphics.DrawLine(pen, 24, 56, 24, 504)
pen.Dispose()
End Sub
When I try to compile I get no errors, but when the form loads, I do not see the line at all (and I'm sure that the line is NOT under the buttons on the form). Any ideas what I might be doing wrong?
![]()




). Any ideas what I might be doing wrong?
Reply With Quote