home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
572
/
xgrafic2
/
demos
/
demo09.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-07-22
|
3KB
|
120 lines
USES XGRAPHIC;
var nom, prenom, age : string;
fin : integer;
case1, case2, case3 : integer;
BEGIN
modevga480;
initsouris;
fenetre3d(50,50,580,250,3,11,1,'EXEMPLE DES FONCTIONS DE SAISIES AVEC XGRAPHIC');
fenetre3d(450,280,540,315,6,16,14,'QUITTER');
texte(70,90,16,'VOTRE NOM : ');
texte(70,115,16,'VOTRE PRENOM : ');
texte(70,138,11,'VOTRE AGE : ');
texte(70,155,11,'NATIONALITE : ');
texte(250,175,16,'FRANCAISE');
texte(250,190,16,'ANGLAISE');
texte(250,205,16,'JAPONAISE');
{Cette fonction gère aussi la touche entrée et la touche <── }
nom := Saisiechaine3din(20,200,80,1,14);
prenom := Saisiechaine3d(15,200,105,7,16);
age := saisiechaine3din(3,200,130,4,15);
cadre3d(10,420,600,460,7);
texte3d(20,430,15,16,'VOUS VOUS APPELEZ '+nom+' '+prenom+' ET VOUS AVEZ '+age+' ANS.');
caseacocher(220,170,7);
caseacocher(220,185,7);
caseacocher(220,200,7);
affichesouris;
fin := 0;
case1 := 0;
case2 := 0;
case3 := 0;
while fin = 0
do begin
if fermeturefenetre3d(450,280,540,315,16) = 1
then begin
finmodegraphique;
fin := 1;
end;
if clickobjet(220,170,230,180) = 1
then begin
if case1 = 0
then begin
cachesouris;
cochecase(220,170,1,15);
decochecase(220,185,7,15);
decochecase(220,200,7,15);
case1 := 1;
remplissage(10,300,400,320,16);
texte(13,303,11,'VOUS AVEZ LA NATIONALITE FRANCAISE');
affichesouris;
end;
if case1 = 1
then begin
cachesouris;
decochecase(220,170,1,15);
case1 := 0;
affichesouris;
end;
end;
if clickobjet(220,185,230,195) = 1
then begin
if case2 = 0
then begin
cachesouris;
decochecase(220,170,7,15);
cochecase(220,185,1,15);
decochecase(220,200,7,15);
case2 := 1;
affichesouris;
remplissage(10,300,400,320,16);
texte(13,303,11,'VOUS AVEZ LA NATIONALITE ANGLAISE');
end;
if case2 = 1
then begin
cachesouris;
decochecase(220,185,1,15);
case2 := 0;
affichesouris;
end;
end;
if clickobjet(220,200,230,210) = 1
then begin
if case3 = 0
then begin
cachesouris;
decochecase(220,170,7,15);
decochecase(220,185,7,15);
cochecase(220,200,1,15);
case3 := 1;
affichesouris;
remplissage(10,300,400,320,16);
texte(13,303,11,'VOUS AVEZ LA NATIONALITE JAPONAISE');
end;
if case3 = 1
then begin
cachesouris;
decochecase(220,200,1,15);
case3 := 0;
affichesouris;
end;
end;
end;
END.