Cze i witam wszystkich.Mam do was wielka prosbe.Musze na jutro napisac program C#,ktory rysuje koło.Nie mam pojecia jak to zrobic :( ,a od tego zalezy moja 2 na semestr z infy.Prosze o pomoc lub o kod zrodlowy.Big thx z gory :P
0
0
W Windows Forms mozna to zrobic uzywajac funkcji DrawEllipse.
Przyklad:
using System;
using System.Drawing;
using System.Windows.Forms;
class Elipsa: Form
{
public static void Main()
{
Application.Run( new Elipsa() );
}
public Elipsa()
{
Text = "Elipsa";
}
protected override void OnPaint( PaintEventArgs pea )
{
Graphics grfx = pea.Graphics;
Pen pen = Pens.Black;
grfx.DrawEllipse( pen, 0, 0, ClientSize.Width - 1, ClientSize.Height - 1 ); // rysuje elipse na calej szerokosci okna
}
}
0
@Aiker
Thx stary jestes wielki [!!!]
Uratowales mi dupe,jeszcze raz big thx 4 u :D