Bonjour tout le monde,
En C#, j'ai 2 forms f1,f2. Je veux que f2 soit à coté de f1.
Comment je dois faire ???
J'ai essayé avec
f2.Location.X = f1.Location.X + f1.Size.Width;
f2.Location.Y = f1.Location.Y;
mais ça ne marche pas !!!
Bonjour tout le monde,
En C#, j'ai 2 forms f1,f2. Je veux que f2 soit à coté de f1.
Comment je dois faire ???
J'ai essayé avec
f2.Location.X = f1.Location.X + f1.Size.Width;
f2.Location.Y = f1.Location.Y;
mais ça ne marche pas !!!
Bonjour,
C'est normal, il faut que tu recréé une structure Point
Essaie ça :
f2.Location = new Point(f1.Location.X + f1.Width, f1.Location.Y);
Bonjour gamisne (ca doit être gasmine je pense)
En fait il y'a pas de méthode fixe. Tu récupère les locations de ta form1 et tu ajoutes quelques Point pour voir![]()
J'ai essayé aussi :
f2.Location = new Point(f1.Location.X + f1.Size.Width, f1.Location.Y);
ça ne marche pas !!!
Ca veut dire quoi ça ne marche pas ? Il y a aucun changement à l'écran, ou ça ne compile pas ?
slt,
J'ai trouvé pourquoi ça ne marche pas.
En fait, on doit changer la propriété startposition en Manual.
Par défaut, c'est WindowDefautLocation.
Partager