Category : Pascal Source Code
Archive   : MOUSER!6.ZIP
Filename : DEMO2.PAS

 
Output of file : DEMO2.PAS contained in archive : MOUSER!6.ZIP
PROGRAM MouserDemo2;

(***************************************************************)
(* *)
(* Demo2.pas *)
(* *)
(***************************************************************)
(* A demonstration for the Mouser! unit *)
(***************************************************************)

USES Mouser55, CRT;

VAR
Ending : Boolean;


PROCEDURE AbortDemo; { This occurs if the }
BEGIN { Mouser! Global Variable }
Writeln('Mouse Driver not loaded'); { INSTALLED Returns False }
Writeln('Demo 1 Aborted');
Blip;
HALT(1);
END;

BEGIN
IF NOT Installed THEN AbortDemo;
Ending:=FALSE;
ClrScr;
TextColor(White);
TextBackground(Red);
GotoXY(36,10); Write(' ');
GotoXY(36,11); Write(' EXIT ');
GotoXY(36,12); Write(' ');
ShowMouse;
REPEAT
IF HitIN(35*8,9*8,42*8,11*8) THEN Ending:=TRUE;
(*
Notice how the SCREEN coordinates could not be directly used
in this instance. This is because most mouse drivers start
at screen coordinates 0,0, and Turbo Pascal writes text to
the screen starting at 1,1. For this reason, a direct 8:1
ratio could not be used... it is more like [(X-1)*8]:1. You
Just need to experiment, using the coordinates of your text
box as the starting point.
Fortunately, Graphics boxes can be positioned on a 1:1 basis!
*)
IF KeyPressed then Ending:=TRUE;
UNTIL Ending;
Blip;
HideMouse;
END.





  3 Responses to “Category : Pascal Source Code
Archive   : MOUSER!6.ZIP
Filename : DEMO2.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/