help with grafix unit please,

below is my code,
its compiling and everything but,
when i click on surface area , then volume , and then surface area again, the program stops, i think its because i am putting a button on to of another or somthing like that .
please check it out and help.
[code]
PROGRAM asavgood;

USES crt,_maus,_grafix,graph;
VAR i:string;
textboxcount:integer;
PROCEDURE showsamenu;
BEGIN
_drawframe(300,50,600,200,'Calculating Surface Areas');
_newbutton('saunisolid','A uniform solid',350,60 ,550,75);
_newbutton('sacylinder','A cylinder ',350,80 ,550,95);
_newbutton('sacone ','A cone ',350,100,550,115);
_newbutton('saconefrus','A cone frustum ',350,120,550,135);
_newbutton('sasphere ','A sphere ',350,140,550,155);
_newbutton('sapyramid ','A pyramid ',350,160,550,175);
END;
PROCEDURE showvomenu;
BEGIN
_drawframe(300,50,600,200,'Calculating Volumes');
_newbutton('vounisolid','A uniform solid',350,60 ,550,75);
_newbutton('vocylinder','A cylinder ',350,80 ,550,95);
_newbutton('vocone ','A cone ',350,100,550,115);
_newbutton('voconefrus','A cone frustum ',350,120,550,135);
_newbutton('vosphere ','A sphere ',350,140,550,155);
_newbutton('vopyramid ','A pyramid ',350,160,550,175);
END;
PROCEDURE showarmenu;
BEGIN
END;

BEGIN
_initgrafix(detect,vgahi,1,'');
setbkcolor(blue);
_drawwindow(10,10,getmaxx-10,getmaxy-10,'Welcome to ASAV');
_setmousewindow(10,10,getmaxx-10,getmaxy-10);
_drawframe(30,40,getmaxx-30,getmaxy-30,'Features');
_drawframe(40,50,250,150,'Calculations');
_newbutton('exit','Exit',40,getmaxy-80,80,getmaxy-60);
_newbutton('sa','Find surface areas',50,60,240,80 );
_newbutton('vo','Find volumes ',50,85,240,105 );
_newbutton('ar','Find areas ',50,110,240,130);
REPEAT
BEGIN
IF _buttonstatus('exit')=true THEN _newtextbox('textbox1','u hit exit',40,getmaxy-50,getmaxx-40,getmaxy-40);
IF _buttonstatus('sa')=true THEN showsamenu;
IF _buttonstatus('vo')=true THEN showvomenu;
IF _buttonstatus('ar')=true THEN showarmenu;
END;
UNTIL _buttonstatus('exit')=true;

END.
[/code]

its supposed to let keep on clicking in surface area and volume until u click on exit, HELP.

Comments

  • z man, ivy one of u guys , manning HELP plz.
    PLEASE!
    with the aboove topic
    btw, where can i get a list of procedures of grafiz?


  • : z man, ivy one of u guys , manning HELP plz.
    : PLEASE!
    : with the aboove topic
    : btw, where can i get a list of procedures of grafiz?

    Sorry Ive never used that toolkit...cant help much.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories