Platforms to show: All Mac Windows Linux Cross-Platform

OverlayMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
This class gives you a window overlaying all other windows with an alpha channel.
Example
dim o as OverlayMBS
dim p as Picture

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

p=New Picture(300,300,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillRect 0,0,300,300

o.Pict=p

p=New Picture(300,300,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillOval 0,0,300,300
p.Graphics.ForeColor=&cFFFFFF
p.Graphics.FillOval 100,100,100,100

o.Mask=p

o.UpdateShow

// wait 5 seconds to see the window
DelayMBS 5

Requires Mac OS X 10.3.9 or Windows 2000 or newer.

Cocoa implementation added with Mac OS X 10.4 class.
To support high resolution mode on Mac OS X high resolution displays, please make the picture+mask exact the double width and height of the window.

Modifiers

Constant Value Description
kModifierFlagCommand 1048576 The command key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagCommand) <> 0 to check if the flag is set in key events.
kModifierFlagControl 262144 The control key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagControl) <> 0 to check if the flag is set in key events.
kModifierFlagOption 524288 The option (alt) key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagOption) <> 0 to check if the flag is set in key events.
kModifierFlagShift 131072 The shift key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagShift) <> 0 to check if the flag is set in key events.

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 24.1
    • Implemented better MovableByWindowBackground for OverlayMBS class on Windows to work with mouse events.
    • Added MovableByWindowBackground property for OverlayMBS class.
    • Implemented IgnoreMouseClicks for Windows in OverlayMBS class. Allows mouse clicks to fall through to window behind.
  • Version 22.5
    • Changed OverlayMBS to return true for worksWhenModal for NSWindow subclass, so you get mouse events if a dialog shows.
  • Version 19.5
    • Changed OverlayMBS class, so if you use draw event, we don't clear the area for you any more.
  • Version 19.2
    • Fixed MouseWheel event in OverlayMBS class to be called more often.
  • Version 19.1
  • Version 19.0
    • Fixed problem with drawing OverlayMBS in 64-bit on MacOS 10.14 Mojave.
  • Version 18.4
  • Version 18.3
    • Fixed Cocoa target for OverlayMBS to not use NSWindowStyleMaskNonactivatingPanel which causes a warning from AppKit.
  • Version 18.2
    • We filter events for OverlayMBS.MouseWheel which have a zero delta.

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


OSAScriptViewMBS   -   PacketSocketMBS


The biggest plugin in space...