J
Also, mal zu der Leserlichkeit deines codes, mach doch sowas hier:
public void Form1_Load(object sender, EventArgs e)
{
createRoatingLabel(l1, "test1", -90, 20, 100, false);
createRoatingLabel(l2, "test2", -90, 20, 500, false);
createRoatingLabel(l3, "test3", -90, 20, 1000, false);
createRoatingLabel(l4, "test4", -90, 20, 1500, false);
createRoatingLabel(l5, "test5", -90, 20, 2000, false);
createRoatingLabel(l6, "test6", -90, 20, 2500, false);
createRoatingLabel(l7, "test7", -90, 20, 3000, false);
createRoatingLabel(l8, "test8", -90, 20, 3500, false);
this.WindowState = FormWindowState.Maximized;
}
private void createRoatingLabel(RotatingLabel rotatingLabel, string text, int rotateAngle, int x, int y, bool visibility)
{
rotatingLabel = new RotatingLabel { NewText = text, RotateAngle = rotateAngle, Location = new Point(x, y), Visible = visibility };
Controls.Add(rotatingLabel);
}
EDIT: Hmm... scheint das er immer wieder zum button scrollt.
Wenn du diesen also nach dem klick entfernen würdest, solltest du das Problem nicht mehr haben.
Weiss natürlich nicht ob du den noch brauchst oder nicht^^.