Creating a Rounded Panel Control Indiana

This article talks about how to make your user interfaces a little jazzier with a rounded rectangle Panel control; a fun chunk of code to incorporate into your application.

Local Companies

partition recovery software
001-9800000000
street
City, IN
windows data recovery
(980) 000-0000
colane
State, IN
recover deleted file
(980) 000-0000
building
State, IN
photo recovery freeware
(980) 000-0000
Lane
City, IN
Computer Systems Services Inc
317-577-4881
6505 E 82nd St
Indianapolis, IN
Convert MySQL to MSSQL
(980) 000-0000
Street
State, IN
freeware keylogger
001-980-0000
Street
City, IN
digital photo recovery
001-980-0000 x000
Street
State, IN
Convert Database
001-980-0000 x000
Lane
State, IN
Computer Associates International Inc
317-844-7221
250 E 96th St
Indianapolis, IN

Introduction



Occasionally, I get tired of plain old rectangular shaped WinForms applications and decide to add some simple rounded-rectangular-ly shaped elements to change it up. The problem is I have to remember how to make them. And, because it's the holiday season, why not keep it fun and light? For your programming pleasure and amusement, in the spirit of the holidays, here is a simple control that rounds the edges of a panel.



Understanding the Coordinate System for Drawing Arcs with GDI+



Generally, in math classes or if you are a pilot or use maps, you think of the coordinate system with North (or 360° or 0°) as being situated at the top, rotation clockwise through 360°. In a Cartesian system this would situate 0° at the top and 180° at the bottom, representing the y-axis and 90° and 270° situated left and right representing the x-axis. GDI+ does not treat the coordinate system that way, at least as far as drawing arcs is concerned. The coordinate system is rotated 90° to the right, as shown in Figure 1.


Figure 1: The Cartesian coordinate system is oriented titled to the right, so 0° is on the right or x-axis.

Knowing the orientation of significant reference points is important if you are going to draw anything manually with GDI+.

Technically, to draw a rounded corner you must know the radius of your circle. The radius will be the offset distance from any of the rectangle's four edges. For example, a rounded upper-right corner would be start at width-d and 0 where d represents the arcs radius, width-d is the x-coordinate and 0 is the y-coordinate. Because the arc starts in the up position, the starting angle would be 270°; to obtain a quarter-circle, the arc would sweep 90°. (Four corners mean 360° divided by 4, yields 90° for each corner arc.) See Figure 2 for an illustration.

Read the Rest of this Article at Developer.com

Featured Local Company

Convert MySQL to MSSQL

9800000000
Street
State, IN

Regional Articles
- Creating a Rounded Panel Control Anderson IN
- Creating a Rounded Panel Control Angola IN
- Creating a Rounded Panel Control Bedford IN
- Creating a Rounded Panel Control Bloomington IN
- Creating a Rounded Panel Control Brazil IN
- Creating a Rounded Panel Control Brownsburg IN
- Creating a Rounded Panel Control Carmel IN
- Creating a Rounded Panel Control Chesterton IN
- Creating a Rounded Panel Control Columbia City IN
- Creating a Rounded Panel Control Columbus IN
- Creating a Rounded Panel Control Connersville IN
- Creating a Rounded Panel Control Crawfordsville IN
- Creating a Rounded Panel Control Crown Point IN
- Creating a Rounded Panel Control Dyer IN
- Creating a Rounded Panel Control East Chicago IN
- Creating a Rounded Panel Control Elkhart IN
- Creating a Rounded Panel Control Evansville IN
- Creating a Rounded Panel Control Fishers IN
- Creating a Rounded Panel Control Fort Wayne IN
- Creating a Rounded Panel Control Franklin IN
- Creating a Rounded Panel Control Gary IN
- Creating a Rounded Panel Control Goshen IN
- Creating a Rounded Panel Control Granger IN
- Creating a Rounded Panel Control Greenfield IN
- Creating a Rounded Panel Control Greenwood IN
- Creating a Rounded Panel Control Hammond IN
- Creating a Rounded Panel Control Hobart IN
- Creating a Rounded Panel Control Huntington IN
- Creating a Rounded Panel Control Indianapolis IN
- Creating a Rounded Panel Control Jeffersonville IN
- Creating a Rounded Panel Control Kendallville IN
- Creating a Rounded Panel Control Kokomo IN
- Creating a Rounded Panel Control Lafayette IN
- Creating a Rounded Panel Control Laporte IN
- Creating a Rounded Panel Control Logansport IN
- Creating a Rounded Panel Control Marion IN
- Creating a Rounded Panel Control Martinsville IN
- Creating a Rounded Panel Control Merrillville IN
- Creating a Rounded Panel Control Michigan City IN
- Creating a Rounded Panel Control Mishawaka IN
- Creating a Rounded Panel Control Muncie IN
- Creating a Rounded Panel Control Munster IN
- Creating a Rounded Panel Control New Albany IN
- Creating a Rounded Panel Control New Castle IN
- Creating a Rounded Panel Control Newburgh IN
- Creating a Rounded Panel Control Noblesville IN
- Creating a Rounded Panel Control North Vernon IN
- Creating a Rounded Panel Control Peru IN
- Creating a Rounded Panel Control Portage IN
- Creating a Rounded Panel Control Richmond IN
- Creating a Rounded Panel Control Schererville IN
- Creating a Rounded Panel Control Seymour IN
- Creating a Rounded Panel Control Shelbyville IN
- Creating a Rounded Panel Control South Bend IN
- Creating a Rounded Panel Control Terre Haute IN
- Creating a Rounded Panel Control Valparaiso IN
- Creating a Rounded Panel Control Vincennes IN
- Creating a Rounded Panel Control Wabash IN
- Creating a Rounded Panel Control Warsaw IN
- Creating a Rounded Panel Control West Lafayette IN
- Creating a Rounded Panel Control Zionsville IN

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML