Utilisation des buttons sous delphi5

dhsofa Messages postés 14 Date d'inscription lundi 10 décembre 2007 Statut Membre Dernière intervention 26 avril 2008 - 29 mars 2008 à 15:26
 Utilisateur anonyme - 29 mars 2008 à 18:04
bonjour , j'ai deux projets:pro1,pro2 comment on fait pour appeler ces deux projets en utilisants deux buttons<?xml:namespace prefix v ns "urn:schemas-microsoft-com:vml" /??><v:shapetype id="_x0000_t202" path="m,l,21600r21600,l21600,xe" o:spt="202" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:path o:connecttype="rect" gradientshapeok="t"></v:path></v:shapetype><v:shape id="_x0000_s1029" style="MARGIN-TOP: 45pt; Z-INDEX: 4; MARGIN-LEFT: 126pt; WIDTH: 153pt; POSITION: absolute; HEIGHT: 27pt; mso-position-horizontal: absolute; mso-position-vertical: absolute" type="#_x0000_t202"></v:shape><v:shape id="_x0000_s1028" style="MARGIN-TOP: 0px; Z-INDEX: 3; MARGIN-LEFT: 126pt; WIDTH: 153pt; POSITION: absolute; HEIGHT: 27pt" type="#_x0000_t202"></v:shape><v:line id="_x0000_s1027" style="Z-INDEX: 2; POSITION: absolute" coordsize="21600,21600" to="117pt,63pt" from="45pt,63pt"><v:stroke endarrow="block"></v:stroke></v:line><v:line id="_x0000_s1026" style="Z-INDEX: 1; POSITION: absolute" coordsize="21600,21600" to="126pt,18pt" from="54pt,18pt"><v:stroke endarrow="block"></v:stroke></v:line><v:shapetype id="_x0000_t75" path="m@4@5l@4@11@9@11@9@5xe" o:spt="75" coordsize="21600,21600" stroked="f" filled="f" o:preferrelative="t">
<v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /??><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shapetype id="_x0000_t75" path="m@4@5l@4@11@9@11@9@5xe" o:spt="75" coordsize="21600,21600" stroked="f" filled="f" o:preferrelative="t"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit">bouton1:fait appele au projet1
bouton2:fait appele au projet2
dans le projet principal projet3
rem: sachant que je connait comment appeler une forme a l'aide du: showmodal()
aidez  moi s'il vous plais</o:lock></v:shapetype>

1 réponse

Utilisateur anonyme
29 mars 2008 à 18:04
Salut;

En utilisant le terme projet tu sous-entend executable : Donc un ShellExecute permet de lancer une application externe.

Si tu parles non pas d'executables mais de forms : Oublie ShowModal

L'aide de Delphi dit ceci

Utilisez la méthode ShowModal pour afficher une fiche comme fiche modale. Dans une fiche modale, l'application ne peut pas continuer à s'exécuter jusqu'à ce que la fiche soit fermée. Par conséquent, ShowModal ne renvoie rien avant la fermeture de la fiche. Lorsque la fiche se ferme, elle renvoie la valeur de la propriété ModalResult.

Pour ouvrir proprement une fiche : MyForm.Show, et pour la fermer MyForm.Hide;

A l'avenir merci de respecter le reglement : On cherche avant de poster (Touche F1 de delphi) et on fait attention à ce que l'on dit (Ta question n'a aucun sens). Les gens commencent à en avoir ras le bol de voir autant de boulets.
0
Rejoignez-nous