Documentation component by John Kelly SCREEN component   

SCREEN Component

The SCREEN object is global, and need not be created. They are actually internal variables. If you have the RAPIDQ2.INC file then you have added functions for the desktop and mouse under Windows.

SCREEN Properties





Screen.ConsoleXWindows UnixINTEGER Returns maximum column for console screen, useful under Unix.
Screen.ConsoleYWindows UnixINTEGER Returns maximum row for console screen, useful under Unix.
Screen.CursorWindowsINTEGER Change global mouse pointer for your active Form
Screen.CursorsWindowsARRAY of INTEGER R/W array of cursor handles.
Screen.HeightWindowsINTEGER Returns Windows screen Height (not to be confused with Form Height)
Screen.MouseXWindowsINTEGERReturns X Coordinate of Mouse Pointer relative to your screen.
Screen.MouseYWindowsINTEGERReturns Y Coordinate of Mouse Pointer relative to your screen.
Screen.WidthWindowsINTEGER Returns Windows screen Width

RAPIDQ2.INC extends these Methods and properties
Method Type Description Params





CaptureToBMP(Rect AS QRECT, CapBitMap AS QBITMAP)
Take a snapshot of the Screen by area defined in Rect. If Rect is NULL, then whole screen is captured. 
Returns False if failed
2
CaptureToFile(Rect AS QRECT, OutFileName AS STRING)
Screen Capture by area defined in Rect. If Rect is NULL, then whole screen is captured
Returns False if failed
2
ClientHeightLONGGet actual drawing area of screen0
ClientWidthLONG Get actual drawing area of screen 0
EnumResolution (ListView AS QLISTBOX) AS LONG possible video modes are stored in a Qlistbox object 2
GetPixel(x AS INTEGER, y AS INTEGER) AS LONG
Get the RGB coded color of pixel at x, y on desktop, or active screen.2
GetPixelDepthLONGFind out the bits/pixel setting of the screen0
MonitorsLONGHow many monitors are connected ?0
MouseButtonsLONGReturns how many mouse buttons0
MousePresentLONGMake sure the mouse is connected or not working0
MouseSwapLONGReports if the user has swapped the left for the right mouse button.0
SetMouseXY(X AS LONG, Y AS LONG) AS LONG Place the mouse cursor at x, y on screen.2
SetResolution(X     AS DWORD, Y      AS DWORD, bpp   AS WORD, 
Freq  AS DWORD)  AS LONG
4
Set the screen resolution, pixel depth and monitor refresh rate. If the mode is not supported, a message box appears informing the Function has failed. Use EnumResolution to find out possible settings. This function should not make a permanent change in the users Registry. Freq (in Hertz) can be set to 0 for no change. Use with caution.

SCREEN Events
Event Type Occurs when... Params





None  ...

SCREEN Examples

$INCLUDE "RapidQ2.INC"
ShowMessage "pixel depth of your screen = "+str$(Screen.GetPixelDepth())
ShowMessage "get ready to change your resolution!"
Screen.SetResolution(800,600,16,0)
ShowMessage "pixel depth= "+str$(Screen.GetPixelDepth())

DIM aRect AS QRECT        'if you want to capture the whole screen then don't set any values,
Screen.CaptureToFile(aRect, "C:\temp.bmp")'if you don't define Rect, then whole screen is captured
Screen.SetResolution(1024,768,32,0)    'or whatever you have....

                       Contents