Platforms to show: All Mac Windows Linux Cross-Platform

Back to OverlayMBS class.

OverlayMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.7 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Calls the destructor.

Closes the window and releases all memory used from the overlay.

OverlayMBS.Constructor(left as Integer, top as Integer, width as Integer, height as Integer, MacAttributes as Integer, WinExStyle as Integer, WinStyle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 10.1 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The advanced constructor where you can pass flags for Mac and Windows directly.

Windows ExStyle flags:
WS_EX_DLGMODALFRAME &h00000001
WS_EX_NOPARENTNOTIFY &h00000004
WS_EX_TOPMOST &h00000008
WS_EX_ACCEPTFILES &h00000010
WS_EX_TRANSPARENT &h00000020
WS_EX_MDICHILD &h00000040
WS_EX_TOOLWINDOW &h00000080
WS_EX_WINDOWEDGE &h00000100
WS_EX_CLIENTEDGE &h00000200
WS_EX_CONTEXTHELP &h00000400
WS_EX_RIGHT &h00001000
WS_EX_LEFT &h00000000
WS_EX_RTLREADING &h00002000
WS_EX_LTRREADING &h00000000
WS_EX_LEFTSCROLLBAR &h00004000
WS_EX_RIGHTSCROLLBAR &h00000000
WS_EX_CONTROLPARENT &h00010000
WS_EX_STATICEDGE &h00020000
WS_EX_APPWINDOW &h00040000
WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE + WS_EX_CLIENTEDGE)
WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE + WS_EX_TOOLWINDOW + WS_EX_TOPMOST)
WS_EX_LAYERED &h00080000
WS_EX_NOINHERITLAYOUT &h00100000
WS_EX_LAYOUTRTL &h00400000
WS_EX_NOACTIVATE &h08000000

Windows Style flags:
WS_OVERLAPPED &h00000000
WS_POPUP &h80000000
WS_CHILD &h40000000
WS_MINIMIZE &h20000000
WS_VISIBLE &h10000000
WS_DISABLED &h08000000
WS_CLIPSIBLINGS &h04000000
WS_CLIPCHILDREN &h02000000
WS_MAXIMIZE &h01000000
WS_CAPTION &h00C00000
WS_BORDER &h00800000
WS_DLGFRAME &h00400000
WS_VSCROLL &h00200000
WS_HSCROLL &h00100000
WS_SYSMENU &h00080000
WS_THICKFRAME &h00040000
WS_GROUP &h00020000
WS_TABSTOP &h00010000
WS_MINIMIZEBOX &h00020000
WS_MAXIMIZEBOX &h00010000

See also:

OverlayMBS.Constructor(left as Integer, top as Integer, width as Integer, height as Integer, WindowsNoActivate as boolean = false, WindowsTopMost as boolean=true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.7 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Creates a new window.
Example
// a dark window with round edges

Var m,p as Picture
static o as OverlayMBS

const rect_width=300
const rect_height=300
const round_rect_int=30

p=New Picture(rect_width,rect_height,32)
m=New Picture(rect_width,rect_height,32)

p.Graphics.ForeColor = RGB( 20,20,20 )
p.Graphics.DrawRect 0, 0, rect_width, rect_height
p.Graphics.FillRect 0, 0, rect_width, rect_height

// fill the window mask with around 10% transparency
m.Graphics.ForeColor = RGB( 20,20,20 )
m.Graphics.FillRoundRect 0, 0, rect_width, rect_height, round_rect_int, round_rect_int

// write text into picture
p.Graphics.ForeColor=&cFFFFFF
p.Graphics.DrawString "Hello",10,20

// make the text not transparent
m.Graphics.ForeColor=&c000000
m.Graphics.DrawString "Hello",10,20

o=new OverlayMBS(200,200,rect_width, rect_height, true)
o.Pict=p
o.Mask=m
o.UpdateShow

Requires Mac OS X 10.3.9 or Windows 2000 or newer.
On success the handle property is not zero.

If WindowsNoActivate the window is setup to not become the front window. This may be a better setup for a toolbar like window.
If WindowsTopMost is false the window is not floating in front of all other windows.

Seems like WindowsNoActivate on Windows works better if you call Show(4) right after the constructor.

For proper support of high resolutions, the pictures used here may need to be 2x or 3x times the window size.

See also:

OverlayMBS.hasShadow as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the window has a shadow.

(Read and Write computed property)

OverlayMBS.Hide

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Hides the window.

OverlayMBS.InvalidateShadow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Invalidates the shadow of the window.

As soon as possible the operation system will recalculate the shadow.
Works only on Mac OS X with Carbon or Cocoa window.

OverlayMBS.Move(left as Integer, top as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Moves the window on the screen to the given position.

OverlayMBS.Resize(width as Integer, height as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Resizes the window.

You need to provide bigger picture before you call this method.

OverlayMBS.SetFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 17.4 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The method to call to set focus to the overlay window.

Works for Windows and macOS Cocoa.

OverlayMBS.Show(WindowsShowMode as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Shows the window onscreen.

Values for the Windows show mode:

default 0
SW_SHOWNORMAL 1
SW_NORMAL 1
SW_SHOWMINIMIZED 2
SW_SHOWMAXIMIZED 3
SW_MAXIMIZE 3
SW_SHOWNOACTIVATE 4
SW_SHOW 5
SW_MINIMIZE 6
SW_SHOWMINNOACTIVE 7
SW_SHOWNA 8
SW_RESTORE 9
SW_SHOWDEFAULT 10
SW_FORCEMINIMIZE 11

OverlayMBS.Title as string

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

This name is not visible as the window has no title bar.
But if you see the window in some window list, this title property will give your overlay window a name.
(Read and Write computed property)

OverlayMBS.Update

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Updates the window.

After you draw new content into the pict and mask pictures, you call this method to apply changes to the window.

See also:

OverlayMBS.Update(NSImage as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Updates overlay window with given NSImage.

Please pass NSImageMBS object.

Version 16.2 and newer also accepts CGImageMBS object here.
If you pass picture, we use it as CGImage or NSImage depending on what picture type you pass.

See also:

OverlayMBS.UpdateShow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
Shows the window and performs an update.

Runs Update and Show internally.

Some examples using this method:

OverlayMBS.WinIsTopMost as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Overlay Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether a window is staying on the top of the other windows.

If true the window stays in front of other windows. Default is false for Xojo windows and true for overlays.
(Read and Write computed property)

Some examples using this property:

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


The biggest plugin in space...