Conforme el trackbar Avanza aumenta el tamano del circulo.
public partial class Form4 : Form
{ // Variable global
private Graphics papel;
public Form4()
{
InitializeComponent();
papel = pictureBox1.CreateGraphics();
{
InitializeComponent();
papel = pictureBox1.CreateGraphics();
}
// Doble click en trackbar1 se genera el metodo siguiente:
private void trackBar1_Scroll(object sender, EventArgs e)
{
SolidBrush pincel = new SolidBrush(Color.Blue);
label1.Text = Convert.ToString(trackBar1.Value);
papel.Clear(Color.White);
papel.FillEllipse(pincel,0,0,trackBar1.Value,trackBar1.Value);
}
{
SolidBrush pincel = new SolidBrush(Color.Blue);
label1.Text = Convert.ToString(trackBar1.Value);
papel.Clear(Color.White);
papel.FillEllipse(pincel,0,0,trackBar1.Value,trackBar1.Value);
}
}
No hay comentarios:
Publicar un comentario