FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Gestion d'un système client-serveur.
calculatrice avec touches movibles Emptypar Klaus Aujourd'hui à 1:15

» item_index(résolu)
calculatrice avec touches movibles Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
calculatrice avec touches movibles Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
calculatrice avec touches movibles Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
calculatrice avec touches movibles Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
calculatrice avec touches movibles Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
calculatrice avec touches movibles Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
calculatrice avec touches movibles Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
calculatrice avec touches movibles Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
calculatrice avec touches movibles Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
calculatrice avec touches movibles Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
calculatrice avec touches movibles Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
calculatrice avec touches movibles Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
calculatrice avec touches movibles Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
calculatrice avec touches movibles Emptypar Jack Mar 30 Avr 2024 - 20:40

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment : -55%
Coffret d’outils – STANLEY – ...
Voir le deal
21.99 €
-39%
Le deal à ne pas rater :
Ordinateur portable ASUS Chromebook Vibe CX34 Flip
399 € 649 €
Voir le deal

 

 calculatrice avec touches movibles

Aller en bas 
AuteurMessage
joeeee2017




Nombre de messages : 60
Date d'inscription : 13/10/2017

calculatrice avec touches movibles Empty
MessageSujet: calculatrice avec touches movibles   calculatrice avec touches movibles EmptyDim 15 Oct 2017 - 0:11

je suis pas doué avec le forum

je remets mon post car je vois pas celui que je viens de poster ou je disais ,j ai essayé de faire une calculatrice ou on deplace les touches pour recuperer leurs positions dans un fichier mais j ai du mal a les deplacer

Code:
dim a$,aa$,op,i,a,b,b$,c$,u,n,l,h,d,v
dim t(40,2),tx$(20),coul,c1,c2,c3,xpad,ypad,yy,xx,zx,zy,click

label calcul,fin,men,men1,men2,carre,virgule,euro,col
label sauve,dep2,col2

main_menu 20
sub_menu 21:caption 21,"Quitte":parent 21,20
sub_menu 22:caption 22,"sauve ":parent 22,20
sub_menu 23:caption 23,"deplacer touche ":parent 23,20
on_click 22,sauve:on_click 21,fin

left 0,1000:top 0,1
width 0,337:height 0,572
caption 0,"Calculatrice"
color 0,236,233,216

data 127,330,202,330,277,330,127,255,202,255,277,255,127,180,202,180,277,180
data 127,405,202,405,352,255,352,180,277,405,352,330,352,405,127,480,127,144,345,144
data "1","2","3","4","5","6","7","8","9","0",".","*","/","C","-","+","=","euro","franc"

l=114:h=59:c1=204:c2=153:c3=0
for i=1 to 19
button i:read a:read b
left i,a-l:top i,b-h:width i,65:height i,65
t(i,1)=a-l:t(i,2)=b-h
next i

width 17,290:height 17,70
width 18,070:height 18,26
width 19,070:height 19,26

for i=1 to 19
read c$:tx$(i)=c$
font_size i,25:caption i,c$
next i

edit 40
left 40,127-l:top 40,77-h
width 40,287:height 40,70
font_size 40,26:font_size 18,14:font_size 19,14

2d_pen_width 7
gosub col
2d_pen_color 252,152,0
2d_rectangle 125-l,75-h,418-l,135-h

on_click 0,col
on_click 18,euro
on_click 19,euro
rem -------------------------------------------
men:
op=2:b$="":a$="":text 40,"0":d=0
rem --------------------------------------------
men1:
aa$=inkey$
u=0
men2:
for i=1 to 17
if clicked(i)=1 then u=i:gosub carre
next i
rem ---
if clicked(23)=1 then d=d+1
if d>1 then d=0:a$=text$(40):goto men2
if d=1 and u>0 then gosub dep2:goto men2
rem ----------------------------------
if u=0 then goto men1
if u=14 then goto men
if u=10 then u=0
if u=11 then gosub virgule:goto men1
if u=17 then gosub calcul:op=2:b$="":goto men1
if u>11 then op=u:gosub calcul:b$="":goto men1
rem -----------------
if op=2 then a$=""
if b$="" then text 40,""
b$=b$+str$(u):text 40,b$
goto men1
rem ---------------------------------------------
calcul:
if a$="" then a$=b$:b$=""
if b$="" then return
if op=13 and val(b$)=0 then beep:text 40,a$:return
if op=12 then a$=str$(val(a$)*val(b$))
if op=13 then a$=str$(val(a$)/val(b$))
if op=15 then a$=str$(val(a$)-val(b$))
if op=16 then a$=str$(val(a$)+val(b$))
text 40,a$:b$=""
return
rem ----------------------------------
dep2:
aa$=inkey$
xpad=mouse_x_position(0)
ypad=mouse_y_position(0)
if mouse_left_up(0)=1 then click=0
if mouse_left_down(0)=1 then click=1
if click=0 then return
2d_pen_color c1,c2,c3
2d_rectangle xpad-15,ypad-15,xpad+80,ypad+80
t(u,1)=xpad:t(u,2)=ypad
left u,xpad:top u,ypad
goto dep2
return
rem ----------------------
sauve:
file_open_write 25,"donée calc.txt"
for i=1 to 19
file_writeln 25, t(i,1)
file_writeln 25, t(i,2)
file_writeln 25, tx$(i)
next i
file_close 25:message "un fichier nommé donée calc.txt vient d' etre créé "
return
rem ---------------------------------------------
carre:
if u=0 or u=17 then return
2d_pen_color 247,79,0
2d_rectangle t(u,1)-2,t(u,2)-2,t(u,1)+67,t(u,2)+67
wait 80
2d_pen_color c1,c2,c3
2d_rectangle t(u,1)-2,t(u,2)-2,t(u,1)+67,t(u,2)+67
return
rem ---------------------------------------------
virgule:
v=0:n=len(b$)
for i=1 to n
if mid$(b$,i,1)="." then v=1
next i
if n=0 then b$=b$+"0.":text 40,b$:return
if v=0 then b$=b$+".":text 40,b$:return
if v=1 then beep
return
rem ---------------------------------------------
euro:
if clicked(18)=1 then text 40,str$(val(text$(40))/6.55957)
if clicked(19)=1 then text 40,str$(val(text$(40))*6.55957)
return
rem ---------------------------------------------
col:
if d=1 then goto col2
c1=c1+12.75:if c1>254 then c1=0
c2=c2+25.5:if c2>254 then c2=0
c3=c3+51:if c3=>254 then c3=0
col2:
2d_fill_color c1,c2,c3:2d_pen_color 0,0,0:2d_rectangle 1,1,428-l,557-h
return
rem ---------------------------------------------
fin:
terminate
return
Revenir en haut Aller en bas
 
calculatrice avec touches movibles
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Codes des touches avec KEY_DOWN_CODE
» Calculatrice
» Calculatrice
» AND OR XOR : calculatrice 8 bits
» mise a jour calculatrice

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos projets-
Sauter vers: