Cita:
Iniciado por HaverRamirez
talvez es porque tiene s el ++ en lugar del --
probe esto
int x;
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
if (numericUpDown1.Value>0)
{
pictureBox1.Refresh();
pictureBox1.Update();
SolidBrush sa = new SolidBrush(Color.Black);
Graphics ga;
ga = pictureBox1.CreateGraphics();
ga.FillRectangle(sa, 400, 350, ++x, ++x);
ga.Dispose();
}
if (numericUpDown1.Value < 1000)
{
pictureBox1.Refresh();
pictureBox1.Update();
SolidBrush sa = new SolidBrush(Color.Black);
Graphics ga;
ga = pictureBox1.CreateGraphics();
ga.FillRectangle(sa, 400, 350, --x, --x);
ga.Dispose();
}
}
y no me lo agranda ni me lo achica el rectangulo y ya me perdi no se que esta mal