We help IT Professionals succeed at work.

how do i insert a shape in toolbox for vb-bet 2003

In VB 6 the shape to draw square rectangle...is  in the default toolbox , but I cannot find it in VB-NET 2003?
Comment
Watch Question

Commented:
There is no shape control in .net, no. You can draw in your form paint event, or use the border prop of your controls on your form (perhaps add a panel or something?).

Here's a free shapecontrol (i havent tried it, but I guess its pretty simple).
http://www.vbforums.com/showthread.php?t=377558

If you like to draw it by yourself (a rectangle on the form):

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
 
 Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Black)
 Dim formGraphics As System.Drawing.Graphics
 formGraphics = Me.CreateGraphics()
 formGraphics.DrawRectangle(myPen, 5, 5, formGraphics.VisibleClipBounds.Width - 10, formGraphics.VisibleClipBounds.Height - 10)
 myPen.Dispose()
 formGraphics.Dispose()
 
End Sub

Open in new window

Éric MoreauSenior .Net Consultant
BRONZE EXPERT
Top Expert 2016

Commented:
if you were using VB2005, I would have said to use the VB power packs (http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.