Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help with grafix unit please,

viv.viv. Posts: 72Member
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

Sign In or Register to comment.