473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Drawing rectangles

Hi,
I use the following code to draw a rectangle:

Dim recBackground As Rectangle
recBackground = New Rectangle(10, 10, 100, 100)

Dim lgb As New LinearGradientBrush(recBackground, Color.White,
Color.GhostWhite, LinearGradientMode.Vertical)

e.Graphics.FillRectangle(lgb, recBackground)

Can I in some way make the corners of the rectangle rounded?

Thanks in advance!

--

Lasse
Nov 20 '05 #1
2 1261
http://www.dotnet247.com/247referenc.../10/51694.aspx

Regards - OHM

"Lasse Eskildsen" <Le****@DELETEwebspeed.dk> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Hi,
I use the following code to draw a rectangle:

Dim recBackground As Rectangle
recBackground = New Rectangle(10, 10, 100, 100)

Dim lgb As New LinearGradientBrush(recBackground, Color.White,
Color.GhostWhite, LinearGradientMode.Vertical)

e.Graphics.FillRectangle(lgb, recBackground)

Can I in some way make the corners of the rectangle rounded?

Thanks in advance!

--

Lasse

Nov 20 '05 #2
http://www.dotnet247.com/247referenc.../10/51694.aspx

Regards - OHM

"Lasse Eskildsen" <Le****@DELETEwebspeed.dk> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
Hi,
I use the following code to draw a rectangle:

Dim recBackground As Rectangle
recBackground = New Rectangle(10, 10, 100, 100)

Dim lgb As New LinearGradientBrush(recBackground, Color.White,
Color.GhostWhite, LinearGradientMode.Vertical)

e.Graphics.FillRectangle(lgb, recBackground)

Can I in some way make the corners of the rectangle rounded?

Thanks in advance!

--

Lasse

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Boni | last post by:
Dear all, I have about 500 rectangles on the picturebox, and if I take one with the move and move I MUST clear the whole picture and redraw, which takes about 1-2 second. The rectangles are...
2
by: johnb41 | last post by:
My app has an image (black/white tiff) displayed in a picturebox (scanned text document). I need the user to be able to draw either white or black rectangles on it. (to hide/cover up sensitive...
1
by: YYZ | last post by:
Sorry for the multipost, but no one was responding in the other thread. If any solution is forthcoming, I will return to the original thread and post it there as well. I've created a usercontrol...
3
by: brianbasquille | last post by:
Hello all, Haven't been here in a while but undertaking a project where i'm branching out the (presumingly abandoned) open-source OpenHTPC (www.openhtpc.org) with additional Personal Video...
3
by: pradnyapatil29 | last post by:
I am trying to draw a chart similar to GANTT chart in asp.net. Right now, I am drawing the rectangles on bitmap...but I dont want to use bitmap . Coz loading bitmap takes time...Is there...
1
by: ShurikAg | last post by:
Hi, I have this kind of class: // SplashWnd.cpp : implementation of the CSplashWnd class // /////////////////////////////////////////////////////////////////////////////
0
by: bienvankhat | last post by:
Hi, i want to simulate a led matrix panel. I create a 8x8 dot led matrix by drawing 64 rectangles in a small area. The panel is made up by 100 matrices. But the drawing process is very slow, it take...
7
by: ddecoste | last post by:
I have a need to add a visual representation to some data in Access. I need to draw a matix of squares inside another square. I have all the data that I need in a record in Access. The data...
11
by: cty0000 | last post by:
I have some quiestion... I want to draw line,point,rectangles and etc... on the from So I code like this.. public update() { g = this.CreateGraphics(); g.FillRectangle(Brushes.White, x1,...
4
by: RobinS | last post by:
I am drawing a rectangle on a picture that has already been drawn on the graphics area (a user control). It works something like this: //in the MouseDown event m_isDragging = true; m_oldX =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.