
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM |
WINDOWS
Hide "roundies" at the bottom of the screen
This demo shows how. Note also the call to FN BlackOutBigWindow and FN ShowMenuBar (in that order) as the program ends -- this makes the bottom "roundies" appear correctly. You should also make these calls when your program gets switched out to background.
'------------------------------------------
DIM gOldMBarHeight, gOldDeskRgn&
END GLOBALS
LOCAL FN HideMenuBar
DIM rect.8, tempRgn&
LONG IF gOldMBarHeight=0 ' not already hidden
gOldDeskRgn&=FN NEWRGN
CALL COPYRGN ([_GrayRgn],gOldDeskRgn&)
gOldMBarHeight = PEEK WORD(_Mbarheight)
POKE WORD _Mbarheight, 0
CALL SETRECT(rect, 0,0,SYSTEM(_scrnWidth),SYSTEM(_scrnHeight))
tempRgn& = FN NEWRGN
CALL RECTRGN(tempRgn&, rect)
CALL UNIONRGN([_GrayRgn], tempRgn&, [_GrayRgn])
CALL PAINTONE(_nil, tempRgn&)'redraw
CALL DISPOSERGN(tempRgn&)
END IF
END FN
LOCAL FN ShowMenuBar
LONG IF gOldMBarHeight>0 ' not already showing
POKE WORD _Mbarheight, gOldMBarHeight
CALL COPYRGN (gOldDeskRgn&,[_GrayRgn])
CALL DISPOSERGN (gOldDeskRgn&)
CALL DRAWMENUBAR
gOldMBarHeight=0
END IF
END FN
LOCAL FN MakeBigWindow
WINDOW 1,"",(0,0)-(SYSTEM(_scrnWidth),SYSTEM(_scrnheight)),3
END FN
LOCAL FN BlackOutBigWindow
FN MakeBigWindow
CALL BACKCOLOR(_blackColor)
CLS
END FN
gOldMBarHeight=0 ' ensure 0 at start
FN HideMenuBar
FN MakeBigWindow
DO
UNTIL (INKEY$<>"") OR FN BUTTON
FN BlackOutBigWindow' ensure bottom corners are black
FN ShowMenuBar
END
|