473,396 Members | 2,076 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,396 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 1264
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.