Platforms to show: All Mac Windows Linux Cross-Platform

Back to OverlayMBS class.

OverlayMBS.Alpha as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The alpha value of the window.

0 is invisible and 1.0 is visible.
(Read and Write property)

OverlayMBS.AutoCaptureMouse as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 9.2 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether the mouse should be captured automatically on Windows.

If you return true from MouseDown the mouse is catched. This way you can get the drag events even if the mouse moves out of the window.
On MouseUp the mouse is released.
(Read and Write property)

OverlayMBS.CurrentImage as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Last image drawn.

For debugging only.
CGImageMBS or NSImageMBS depending on what you set.
(Read only property)

OverlayMBS.Height as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The height of the window.

Using Resize method is more efficient than assigning width and height properties.
(Read and Write property)

OverlayMBS.IgnoreMouseClicks as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.7 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Whether this window should react to mouse clicks.

In Mac OS X 10.7 and newer setting IgnoreMouseClicks = false does not give the same behavior as without setting this property before.

Implemented for windows in v24.1.
(Read and Write property)

Some examples using this property:

OverlayMBS.Left as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The position of the window.
Example
static o as OverlayMBS // keep the variable global somewhere. Static or part of a module or in app class.

o = new OverlayMBS(100,100,100,100)

o.Pict = LogoMBS(100)
o.mask = LogoMBS(100)

o.Left = 200

o.UpdateShow

Using Move method is more efficient than assigning left and top properties.
(Read and Write property)

OverlayMBS.Mask as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The mask for the window.

You need to create and assign your own image.
If you assign nil for the mask, the plugin uses the mask or alpha channel of the picture.

For proper support of high resolutions, the pictures used here may need to be 2x or 3x times the window size.
(Read and Write property)

OverlayMBS.MovableByWindowBackground as Boolean   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 24.1 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
A Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background.

The value of this property is true when the window is movable by clicking and dragging anywhere in its background; otherwise, false.

Works on macOS and Windows.
(Read and Write property)

OverlayMBS.NSView as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 15.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The NSView showing the content of the overlay.

(Read only property)

OverlayMBS.NSWindow as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a reference to the NSWindowMBS object which you can use to make additional settings to the overlay window.
Example
dim o as OverlayMBS // your window

dim n as NSWindowMBS = o.NSWindow
// this window should not hide if app hides
n.canHide = false

Only for the Cocoa target in Xojo.
(Read only property)

Some examples using this property:

OverlayMBS.Pict as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The picture for the window content.

You need to provide your own picture here.
Pict and Mask pictures must have the same size.

Alpha Channel Pictures are not really supported.
But for Mac OS X an alpha channel picture does currently work.

For proper support of high resolutions, the pictures used here may need to be 2x or 3x times the window size.
(Read and Write property)

OverlayMBS.Top as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The position of the window.
Example
static o as OverlayMBS // keep the variable global somewhere. Static or part of a module or in app class.

o = new OverlayMBS(100,100,100,100)

o.Pict = LogoMBS(100)
o.mask = LogoMBS(100)

o.top = 200

o.UpdateShow

Using Move method is more efficient than assigning left and top properties.
(Read and Write property)

OverlayMBS.Visible as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Whether the window is visible.
Example
dim o as OverlayMBS
// ....
o.visible=true

True if visible, false if hidden.
(Read and Write property)

OverlayMBS.Width as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The width of the window.

Using Resize method is more efficient than assigning width and height properties.
(Read and Write property)

OverlayMBS.WindowHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The internal used window handle.

On Mac OS a WindowRef and on Windows a HWND.
(Read only property)

OverlayMBS.WindowID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 10.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Queries the CoreGraphics Window ID for the given window.

Returns 0 on any error.
This ID can be used for CGWindowListCreateImageMBS.
(Read only property)

Some examples using this property:

OverlayMBS.WindowsClassName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 18.4 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The Windows' window class name.

(Read only property)

The items on this page are in the following plugins: MBS Overlay Plugin.


The biggest plugin in space...