home *** CD-ROM | disk | FTP | other *** search
- 100 '************ GEMSYS() DEMO PROGRAM ************
- 110 '************ by JIM LUCZAK **********
- 120 '
- 130 ' ----------- INITIALIZE PROGRAM -------------
- 140 fullw 2: clearw 2: flag=0: bs=0: offset=22
- 150 a#=gb
- 160 gintin=peek(a#+8): ' Defint Integer Input
- 170 gintout=peek(a#+12): ' Define Integer Output
- 180 a$="Hold LEFT mouse button down when entering or exiting box to EXIT demo"
- 190 '-------- DRAW GROWING BOX --------
- 200 poke gintin,320: ' X coordinate initial size
- 210 poke gintin+2,75+offset: ' Y coordinate initial size
- 220 poke gintin+4,2: ' Initial width
- 230 poke gintin+6,1: ' Initial height
- 240 poke gintin+8,270: ' X coordinate final size
- 250 poke gintin+10,25+offset: ' Y coordinate final size
- 260 poke gintin+12,100: ' Final width
- 270 poke gintin+14,100: ' Final height
- 280 gemsys(73): ' Graf growbox
- 290 ' -------- DRAW BOX OUTLINE ------
- 300 linef 270,25,370,25
- 310 linef 370,25,370,125
- 320 linef 370,125,270,125
- 330 linef 270,125,270,25
- 340 gotoxy 3,14: ?a$
- 350 '--------FIND POINTER LOCATION -------
- 360 gemsys(79): '
- 370 mx=peek(gintout+2): ' Current X coordinate of pointer
- 380 my=peek(gintout+4): ' Current Y coordinate of pointer
- 390 flag=0
- 400 if (mx>270 and mx<370) and (my>25+offset and my<125+offset) then flag=1
- 410 '------------ SET UT PARAMETERS FOR MOUSE EVENT -------
- 420 poke gintin+2,270:' X coordinate of rectangle
- 430 poke gintin+4,25+offset: ' Y coordinate of rectangle
- 440 poke gintin+6,100: 'Width of rectangle
- 450 poke gintin+8,100: ' Height of rectangle
- 460 '------------ MAKE SURE MOUSE POINTER IS VISIBLE --------
- 470 poke gintin,257: ' Show mouse form
- 480 gemsys(78): ' Graf muse
- 490 '--------- MAIN PROGRAM LOOP -----------
- 500 while bs=0
- 510 poke gintin,index: ' Mouse form
- 520 gemsys(78): ' Graf mouse
- 530 poke gintin,flag: ' Flag for event mouse call
- 540 gemsys(22): ' Event mouse
- 550 mx=peek(gintout+2): 'X coordinate of mouse
- 560 my=peek(gintout+4): ' Y coordinate of mouse
- 570 bs=peek(gintout+6): ' State of mouse button
- 580 if flag=0 then flag=1: B$="Mouse ENTERED" else flag=0: b$="Mouse EXITED"
- 590 gotoxy 9,1: ?b$" box at these Coordinates. X = "mx" Y = "my" "
- 600 index=index+1: if index>7 then index=0
- 610 wend
- 620 '------- DRAW SHRINKING BOX --------
- 630 poke gintin,320: ' X coordinate final size
- 640 poke gintin+2,75+offset: ' Y coordinate final size
- 650 poke gintin+4,2: ' Final width
- 660 poke gintin+6,1: ' Final height
- 670 poke gintin+8,270: ' X coordinate initial size
- 680 poke gintin+10,25+offset: ' Y coordinate initial size
- 690 poke gintin+12,100: ' Initial width
- əəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəə