Click here to Skip to main content
15,920,602 members
Home / Discussions / C#
   

C#

 
AnswerRe: Want to cycle through a pen Array Pin
Robert Rohde1-Oct-05 10:20
Robert Rohde1-Oct-05 10:20 
GeneralRe: Want to cycle through a pen Array Pin
Anonymous1-Oct-05 10:30
Anonymous1-Oct-05 10:30 
GeneralRe: Want to cycle through a pen Array Pin
Robert Rohde1-Oct-05 11:45
Robert Rohde1-Oct-05 11:45 
GeneralRe: Want to cycle through a pen Array Pin
Member 23224411-Oct-05 11:53
Member 23224411-Oct-05 11:53 
QuestionBOOL FLAG Problem in Paint Handler Pin
Anonymous1-Oct-05 7:28
Anonymous1-Oct-05 7:28 
AnswerRe: BOOL FLAG Problem in Paint Handler Pin
Robert Rohde1-Oct-05 7:42
Robert Rohde1-Oct-05 7:42 
GeneralRe: BOOL FLAG Problem in Paint Handler Pin
Anonymous1-Oct-05 9:11
Anonymous1-Oct-05 9:11 
AnswerRe: BOOL FLAG Problem in Paint Handler Pin
Mahesh Kumar V K2-Oct-05 23:16
Mahesh Kumar V K2-Oct-05 23:16 
Try out this code as an example -

public class Form1 : System.Windows.Forms.Form<br />
	{<br />
		private System.Windows.Forms.Button button1;<br />
		private bool drawline = false;<br />
		private int radius = 25;<br />
		private int green = 10;<br />
		private int red = 10;<br />
		private int blue = 10;<br />
         }<br />
<br />
<br />
private void Button_1OK__Click(object sender, System.EventArgs e)<br />
{<br />
drawline = !drawline;<br />
			Random r = new Random(100);<br />
			Int32 x = Int32.Parse(r.Next().ToString().Substring(1,2));<br />
			Int32 y = Int32.Parse(r.Next().ToString().Substring(1,3));<br />
			<br />
			if (green < 230)<br />
                green += 10;<br />
			<br />
			if (blue < 230)<br />
				blue += 10;<br />
			<br />
			if (red < 230)<br />
				red += 10;<br />
<br />
			if (drawline)<br />
			{<br />
				System.Drawing.Graphics g = this.CreateGraphics();<br />
				Point P = new Point(x,100);<br />
				Point p1 = new Point (100,y);<br />
				Color j = Color.FromArgb(red,green,blue);<br />
				Pen Pe = new Pen(j);<br />
				<br />
				g.DrawEllipse(Pe,x,x ,radius, radius);<br />
				radius += 20;<br />
			}<br />
			else<br />
			{<br />
				System.Drawing.Graphics g = this.CreateGraphics();<br />
				Point P = new Point(x,100);<br />
				Point p1 = new Point (100,y);<br />
				Color j = Color.FromArgb(red,green,blue);<br />
				Pen Pe = new Pen(j);<br />
				<br />
				g.DrawEllipse(Pe,y,y ,radius, radius);<br />
				radius += 20;<br />
				this.Refresh();<br />
			}<br />
}


Regards
Mahesh
QuestionProperty Builder? Pin
Sled Dog1-Oct-05 5:46
Sled Dog1-Oct-05 5:46 
AnswerRe: Property Builder? Pin
David Stone1-Oct-05 19:38
sitebuilderDavid Stone1-Oct-05 19:38 
GeneralRe: Property Builder? Pin
Sled Dog2-Oct-05 2:38
Sled Dog2-Oct-05 2:38 
QuestionResize the user defined control Pin
Ming Luo1-Oct-05 5:45
Ming Luo1-Oct-05 5:45 
AnswerRe: Resize the user defined control Pin
Robert Rohde1-Oct-05 7:50
Robert Rohde1-Oct-05 7:50 
Questionmodify Lunar Lander game Pin
nume1-Oct-05 5:41
nume1-Oct-05 5:41 
AnswerRe: modify Lunar Lander game Pin
Robert Rohde1-Oct-05 7:56
Robert Rohde1-Oct-05 7:56 
Questionpanel shape hotspots Pin
michaelreian1-Oct-05 4:31
michaelreian1-Oct-05 4:31 
QuestionHost a Remote Object in a Windows Service Pin
akshayswaroop1-Oct-05 4:04
akshayswaroop1-Oct-05 4:04 
QuestionDatagrid_pageindexchanged event is not firing Pin
Deepml1-Oct-05 2:30
Deepml1-Oct-05 2:30 
QuestionStructs or Classes Pin
Heinz_30-Sep-05 18:00
Heinz_30-Sep-05 18:00 
AnswerRe: Structs or Classes Pin
Jose Lamas Rios30-Sep-05 18:31
Jose Lamas Rios30-Sep-05 18:31 
AnswerRe: Structs or Classes Pin
Mystic_Unicorn30-Sep-05 22:16
Mystic_Unicorn30-Sep-05 22:16 
GeneralRe: Structs or Classes Pin
Tim Smith1-Oct-05 16:35
Tim Smith1-Oct-05 16:35 
GeneralRe: Structs or Classes Pin
big_trev2-Oct-05 0:52
big_trev2-Oct-05 0:52 
AnswerRe: Structs or Classes Pin
Tim Smith1-Oct-05 16:36
Tim Smith1-Oct-05 16:36 
GeneralRe: Structs or Classes Pin
leppie2-Oct-05 3:20
leppie2-Oct-05 3:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.