?
Solved

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

Posted on 2008-01-27
2
Medium Priority
?
673 Views
Last Modified: 2012-06-27
In VB 6 the shape to draw square rectangle...is  in the default toolbox , but I cannot find it in VB-NET 2003?
0
Comment
Question by:tareq_y
2 Comments
 
LVL 12

Accepted Solution

by:
vb_jonas earned 150 total points
ID: 20757551
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

0
 
LVL 71

Expert Comment

by:Éric Moreau
ID: 20758096
if you were using VB2005, I would have said to use the VB power packs (http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This video teaches viewers about errors in exception handling.
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question