Make a line control:
Create a Windows Library add a class with this code:
Public Class Line
Inherits Windows.Forms.Control
Public Sub New()
SetStyle(Windows.Forms.ControlStyles.ResizeRedraw, True)
End Sub
Private Sub Line_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawLine(New Drawing.Pen(Me.ForeColor), 0, 0, Me.Width - 1, Me.Height - 1)
End Sub
End Class
then:
- Compile the class library
- Right click the ToolBox, point to add remove items
- Click browse
- Look for the compiled dll
- Click OK
- The line control should be in the toolbar
- Drag it into your form.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only