Platforms to show: All Mac Windows Linux Cross-Platform
Back to OverlayMBS class.
OverlayMBS.Close
Function:
Calls the destructor.
Notes: Closes the window and releases all memory used from the overlay.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.7 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes: 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)
Function:
The advanced constructor where you can pass flags for Mac and Windows directly.
Notes:
Windows ExStyle flags:
Windows Style flags:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes:
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)
Function:
Creates a new window.
Example:
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.7 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Example:
// a dark window with round edges
dim 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
Function:
Whether the window has a shadow.
Notes: (Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Window | MBS Overlay Plugin | 13.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes: (Read and Write computed property)
OverlayMBS.Hide
Function:
Hides the window.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
OverlayMBS.InvalidateShadow
Function:
Invalidates the shadow of the window.
Notes:
As soon as possible the operation system will recalculate the shadow.
Works only on Mac OS X with Carbon or Cocoa window.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes:
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)
Function:
Moves the window on the screen to the given position.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
OverlayMBS.Resize(width as Integer, height as Integer)
Function:
Resizes the window.
Notes: You need to provide bigger picture before you call this method.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes: You need to provide bigger picture before you call this method.
OverlayMBS.SetFocus
Function:
The method to call to set focus to the overlay window.
Notes: Works for Windows and macOS Cocoa.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 17.4 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes: Works for Windows and macOS Cocoa.
OverlayMBS.Show(WindowsShowMode as Integer = 0)
Function:
Shows the window onscreen.
Notes:
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
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes:
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
Function:
The title of the window.
Notes:
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)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Window | MBS Overlay Plugin | 11.0 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes:
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
Function:
Updates the window.
Notes: After you draw new content into the pict and mask pictures, you call this method to apply changes to the window.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes: 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)
Function:
Updates overlay window with given NSImage.
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes:
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
Function:
Shows the window and performs an update.
Notes: Runs Update and Show internally.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Window | MBS Overlay Plugin | 8.6 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes: Runs Update and Show internally.
Some examples using this method:
OverlayMBS.WinIsTopMost as boolean
Function:
Whether a window is staying on the top of the other windows.
Notes:
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)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Window | MBS Overlay Plugin | 12.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
Notes:
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.
