Posts

20 juin

Image
Pour les articles homonymes, voir Vingt-Juin. .mw-parser-output .entete.calendrier{background-image:url("//upload.wikimedia.org/wikipedia/commons/4/4a/Almanacco.png")} Éphémérides Juin 1 er 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30           20 mai 20 juillet Chronologies thématiques .mw-parser-output .sep-liste{font-weight:bold} Croisades  • Ferroviaires  • Sports Disney  • Anarchisme  • Catholicisme Abréviations / Voir aussi (° 1852) = né en 1852 († 1885) = mort en 1885 a.s. = calendrier julien n.s. = calendrier grégorien Calendrier Calendrier perpétuel Liste de calendriers modifier Le 20 juin est le 171 e jour de l'année du calendrier grégorien, le 172 e en cas d'année bissextile. Il reste 194 jours avant la fin de l'année. C'était généralemen...

How to access a form control for another form?

Image
9 2 I have two Form classes, one of which has a ListBox . I need a setter for the SelectedIndex property of the ListBox , which I want to call from the second Form . At the moment I am doing the following: Form 1 public int MyListBoxSelectedIndex { set { lsbMyList.SelectedIndex = value; } } Form 2 private ControlForm mainForm; // form 1 public AddNewObjForm() { InitializeComponent(); mainForm = new ControlForm(); } public void SomeMethod() { mainForm.MyListBoxSelectedIndex = -1; } Is this the best way to do this? c# winforms controls share | improve this question edited Dec 14 '12 at 23:53 ...