home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 3
/
AnewsCD3.iso
/
DP
/
Programmation
/
PureBasic_Demo
/
Examples
/
Sources
/
Screen.pb
< prev
next >
Wrap
Text File
|
1999-10-10
|
1KB
|
58 lines
;
; ***********************************
;
; Screen example file for Pure Basic
;
; © 1999 - Fantaisie Software -
;
; ***********************************
;
;
InitScreen(1) ; We will need 2 screens
If FindScreen(0,"") ; Find de default public screen
Print("Screen address: ") : PrintNum(ScreenID()) : NPrint("")
HideScreen() ; Hide it
Delay(10) ; Wait a little bit...
ShowScreen() ; and show it !
NPrint("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
NPrint("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
Delay(50)
CloseScreen(1)
EndIf
UseScreen(0)
a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
NPrint("Pure White colour found at colour: "+Str(a))
ReleasePen(a) ; Release it to the system
If FindScreen(1,"Workbench") ; Find the WB Screen
NPrint("Workbench screen found !")
Print("Screen RastPort: ") : PrintNum(ScreenRastPort())
Print(", Screen ViewPort: ") : PrintNum(ScreenViewPort()) : NPrint("")
Delay(10) ; Flash the workbench screen !
FlashScreen()
Else
NPrint("Workbench screen isn't found ?!")
Endif
EndIf
End