Quick Start

Installation

To use the Display Overlord Classes in your REALbasic project simply drag the "Display Overlord" folder included in the download archive into the IDE's Project tab.

Example #1

Display Overlord supports "quick & dirty" display configuration for times when you know the hardware's capabilities ahead of time. This is often useful while prototyping, or when deploying kiosk applications where hardware is known and consistent.

Dim success As Boolean

' Capture the main screen at a resolution of 800x600
success = DisplayOverlord.Capture(DisplayOverlord.MainDevice, 800, 600)

if success then

 ' Do something while captured...

 ' Release when finished
 DisplayOverlord.Release

else
 ' Capture failed
end if

Example #2

The following sequence is recommended for more robust display capturing. Note that the following is pseudo-code to show the basic logic flow, please see the API Reference and the "Display Overlord Example.rbp" project included in the download archive for implementation details.

Dim deviceindex As Integer
Dim mode As DisplayOverlordMode
Dim success As Boolean

Const fadetime = 1.0' in seconds

' Grab the screen and mode (implemented elsewhere)
deviceindex = GetDeviceIndex()
mode = GetDisplayMode()

' Fade all displays to black
DisplayOverlord.FadeToSolid(fadetime)

' Capture the target display using the selected mode
success = DisplayOverlord.Capture(deviceindex, mode)

if success then

 ' Fade back in
 DisplayOverlord.FadeToNormal(fadetime)

 ' Do something while captured...

 ' Fade to black, release, then fade back in when finished
 DisplayOverlord.FadeToSolid(fadetime)
 DisplayOverlord.Release
 DisplayOverlord.FadeToNormal(fadetime)

else
 ' Capture failed
end if