473,385 Members | 1,384 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.

Problem - Creating Circle in Picture Box

Hello

I want to create a circle in picture box.I am trying to do the same but not getting the right output.

The code is as follow :

pictureBox1.Height = 200;
pictureBox1.Width = 200;
pictureBox1.BorderStyle = BorderStyle.FixedSingle;
Graphics g = pictureBox1.CreateGraphics();
Rectangle rect = new Rectangle(0,0, 200, 200);
g.DrawEllipse(Pens.Black , rect);



So please help me to come out with this problem.

Thanking you in advanced.
Apr 18 '08 #1
1 1274
NitinSawant
270 100+
To draw circle you should use paint event of the picturebox object
Apr 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David | last post by:
Hello I'm writting an apllication and i like to display and offscreen image. However my code doesn't seem to work. It compiles and runs properly but What i want is to associate the button of the...
5
by: Joan | last post by:
I am creating a word document from an asp page. I have no problems actaully creating the document and creating some tables that have data in them. I am using Response.ContentType =...
11
by: franklini | last post by:
hello people, just wanted to say thanks again for the help in the past. i have a new problem which am wondering if any body can help me with. i have written this abtract class shape and its...
1
by: CodeMonkey | last post by:
Hi, I am trying to use xml serialization to simplify load/save functions in some classes i have created and am hitting a few problems. Any help to either would be most appreciated. I have...
5
by: John Smith | last post by:
The exercise is to calculate the approximate area of a circle by the "calculus method." That is, finding the area of rectangles nearly filling the circle. I calculate the area of rectangles in 1/4...
4
by: Crirus | last post by:
I have a square picture. I need to draw a circle on it, and everything outside that circle to be set to a certain color, so the image looks framed On other words, I want to crop a circle form a...
7
by: Tem | last post by:
I need to draw a black lined circle and save it as a gif file. Can this be done with wpf or do I need to use GDI+ The examples I found seem to only apply to UI elements not a file. Thank you ...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
14
Jezternz
by: Jezternz | last post by:
Hi. Ok basicly I am working on something using C# XNA and I cant get my head around it, possibly a simple answer I dont know. I have a circle with a center point, co-ordinates (0,0). The...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.