i am using a mouse in my pascal program along with some graphical menu's which i dloaded from this site. this thing is i want to know how do i get to link these menu's when i click on the option when i am testing it. i tried case statemenst but the synatx is wrong and i get an error or i should not use case statements. i also want to know if a user can write from the keyboard when in grafix mode if not how can i get around it.
so of my code:
[/Program Resultz (input,output);
uses crt, mouse,Graph,_Grafix,_Maus;
VAR
gmx,gmy : integer;
x:string;
Procedure menu(gmx,gmy:integer);
Begin
_InitGrafix(detect,vgahi,1,'');
setbkcolor(blue);
_DrawWindow(40,40,getmaxX - 100 ,getmaxY - 60,'Resultz DB_PRO V.S.1.0');
_SetMouseWindow(5,5,getmaxX - 10,getmaxY - 10);
settextjustify(centertext,centertext);
outtextxy(270,85 ,' MAIN MENU ');
_NewButton('Accessory Inventory','Accessory Database',180,100,350,125);
_NewButton('Customer Database','Customer Database', 180,160,350,185);
_NewButton('Report Generator','Report Generator', 180,220,350,245);
_NewButton('System Tools','System Tools', 180,280,350,305);
_NewButton('exit','Exit System' , 180,360,350,385);
repeat
_AllButtonStatus;
until _ButtonStatus('exit')=true;
{close the grafikmode and hide the mouse}
_closegrafix;
end; {there is a problem in this line}
{Procedure inventory(gmx,gmy:integer);
begin
_InitGrafix(detect,vgahi,1,'');
setbkcolor(blue);
_DrawWindow(40,40,getmaxX - 100 ,getmaxY - 60,'Resultz DB_PRO V.S.1.0');
_SetMouseWindow(5,5,getmaxX - 10,getmaxY - 10);
settextjustify(centertext,centertext);
outtextxy(270,85 ,' ACCESSORY DATABSE ');
_NewButton('ADD','ADD NEW ACCESSORY',80,100,350,125);
_NewButton('EDIT','EDIT DATABASE',180,788,233,443);
_NewButton('DEL' ,'DELETE ACCESSORY', 180,160,350,185);
_NewButton('VIEW','VIEW ACCESSORY ', 180,220,350,245);
_NewButton('nview', 'VIEW ENTIRE DATABSASE',180,566,778,777);
_NewButton('SAVE','SAVE DATABSE', 180,280,350,305);
_NewButton('CLOSE','MAIN MENU' , 180,360,350,365);
if _buttonstatus('close')=true
then
menu(gmx,gmy);
end; }
begin
menu(gmx,gmy);
{inventory(gmx,gmy);}
end. /]