Platforms to show: All Mac Windows Linux Cross-Platform

Next items

OverlayMBS.Alpha as Double
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The alpha value of the window.
Notes:
0 is invisible and 1.0 is visible.
(Read and Write property)
OverlayMBS.AutoCaptureMouse as Boolean
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 9.2, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Whether the mouse should be captured automatically on Windows.
Notes:
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)
class OverlayMBS
class, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: 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=NewPicture(300,300,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillRect 0,0,300,300

o.Pict=p

p=NewPicture(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
Notes:
Requires Mac OS X 10.3.9 or Windows 2000 or newer.

Cocoa implementation added with Mac OS X 10.4 class.
OverlayMBS.Close
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Calls the destructor.
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)
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 10.1, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Not yet documented.
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)
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Creates a new window.
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=NewPicture(rect_width,rect_height,32)
m=NewPicture(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
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.

See also:

OverlayMBS.Height as Integer
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The height of the window.
Notes: (Read and Write property)
OverlayMBS.Hide
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Hides the window.
OverlayMBS.IgnoreMouseClicks as Boolean
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Whether this window should react to mouse clicks.
Notes: (Read and Write property)
OverlayMBS.Left as Integer
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: 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
Notes: (Read and Write property)
OverlayMBS.MacTransitionWindow(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer, async as boolean, duration as double) as integer
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Runs window transition with additional parameters and rectangle.
Notes:
Transitions a window from one state to another with appropriate animation and sound.

self: The window that should be transitioned.
parent: For use with kWindowSheetTransitionEffect. This is the parent window of the sheet.
effect: The type of visual effect to use.
action: The action to take on the window.
left:The rectangle to be used.
top:The rectangle to be used.
width:The rectangle to be used.
height:The rectangle to be used.
async:Whether the transition should run synchronously or asynchronously. If Async is true, TransitionWindow will return immediately, and the transition will run using an event loop timer. You must run your event loop for the transition to occur. If Async is false, TransitionWindow will block until the transition is completed.
duration:The duration of the fade, in seconds. For use with the Sheet, Slide, Fade, and Genie transition effects; ignored for other effects. You may pass 0 to use the default duration. The effect is not guaranteed to last precisely this long, but should be a close approximation.

Returns Mac OS error code like 0 for success, -1 for parameter error in the plugin or -50 for parameter error.

Visual effects that are provided by TransitionWindow:
kWindowZoomTransitionEffect1Finder-like zoom rectangles. Use with TransitionWindow and Show or Hide transition actions
kWindowSheetTransitionEffect2Zoom in/out from parent. Use with TransitionWindowAndParent and Show or Hide transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowSlideTransitionEffect3Slide the window into its new position. Use with TransitionWindow and Move or Resize transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowFadeTransitionEffect4Fade the window into or out of visibility. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later.
kWindowGenieTransitionEffect5Use the Genie effect that the Dock uses to minimize or maximize a window to show or hide the window. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later.

Actions: Modifications to window state that are provided by TransitionWindow
kWindowShowTransitionAction1Shows the window. Use with the Zoom, Sheet, Fade, or Genie transition effects. For the Zoom, Sheet, and Genie effects, the rectangle parameter is the global coordinates from which to start the animation; rectangle is optional for the Zoom and Sheet effects, and in that case, the animation begins at the center of the window. The Genie effect requires a rectangle parameter. The Fade effect does not use the inRect parameter.
kWindowHideTransitionAction2Hides the window. Use with the Zoom, Sheet, Fade, or Genie transition effects. For the Zoom, Sheet, and Genie effects, the rectangle parameter is the global coordinates at which to end the animation; Recangle is optional for the Zoom and Sheet effects, and in that case, the animation ends at the center of the window. The Genie effect requires a rectangle. The Fade effect does not use the inRect parameter.
kWindowMoveTransitionAction3Moves the window. Use with the Slide transition effect. The rectangle parameter is the global coordinates of the window's new structure bounds; Rectangle must be provided. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowResizeTransitionAction4Resizes the window. Use with the Slide transition effect. The rectangle parameter is the global coordinates of the window's new structure bounds; Rectangle must be provided. Available in Mac OS X, and in CarbonLib 1.5 and later.

See also:

OverlayMBS.MacTransitionWindow(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer, async as boolean, duration as double) as integer
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Runs window transition with additional parameters and rectangle.
Notes:
Transitions a window from one state to another with appropriate animation and sound.

self: The window that should be transitioned.
parent: For use with kWindowSheetTransitionEffect. This is the parent window of the sheet.
effect: The type of visual effect to use.
action: The action to take on the window.
left:The rectangle to be used.
top:The rectangle to be used.
width:The rectangle to be used.
height:The rectangle to be used.
async:Whether the transition should run synchronously or asynchronously. If Async is true, TransitionWindow will return immediately, and the transition will run using an event loop timer. You must run your event loop for the transition to occur. If Async is false, TransitionWindow will block until the transition is completed.
duration:The duration of the fade, in seconds. For use with the Sheet, Slide, Fade, and Genie transition effects; ignored for other effects. You may pass 0 to use the default duration. The effect is not guaranteed to last precisely this long, but should be a close approximation.

Returns Mac OS error code like 0 for success, -1 for parameter error in the plugin or -50 for parameter error.

Visual effects that are provided by TransitionWindow:
kWindowZoomTransitionEffect1Finder-like zoom rectangles. Use with TransitionWindow and Show or Hide transition actions
kWindowSheetTransitionEffect2Zoom in/out from parent. Use with TransitionWindowAndParent and Show or Hide transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowSlideTransitionEffect3Slide the window into its new position. Use with TransitionWindow and Move or Resize transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowFadeTransitionEffect4Fade the window into or out of visibility. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later.
kWindowGenieTransitionEffect5Use the Genie effect that the Dock uses to minimize or maximize a window to show or hide the window. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later.

Actions: Modifications to window state that are provided by TransitionWindow
kWindowShowTransitionAction1Shows the window. Use with the Zoom, Sheet, Fade, or Genie transition effects. For the Zoom, Sheet, and Genie effects, the rectangle parameter is the global coordinates from which to start the animation; rectangle is optional for the Zoom and Sheet effects, and in that case, the animation begins at the center of the window. The Genie effect requires a rectangle parameter. The Fade effect does not use the inRect parameter.
kWindowHideTransitionAction2Hides the window. Use with the Zoom, Sheet, Fade, or Genie transition effects. For the Zoom, Sheet, and Genie effects, the rectangle parameter is the global coordinates at which to end the animation; Recangle is optional for the Zoom and Sheet effects, and in that case, the animation ends at the center of the window. The Genie effect requires a rectangle. The Fade effect does not use the inRect parameter.
kWindowMoveTransitionAction3Moves the window. Use with the Slide transition effect. The rectangle parameter is the global coordinates of the window's new structure bounds; Rectangle must be provided. Available in Mac OS X, and in CarbonLib 1.5 and later.
kWindowResizeTransitionAction4Resizes the window. Use with the Slide transition effect. The rectangle parameter is the global coordinates of the window's new structure bounds; Rectangle must be provided. Available in Mac OS X, and in CarbonLib 1.5 and later.

See also:

OverlayMBS.Mask as Picture
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The mask for the window.
Notes:
You need to create and assign your own image.
(Read and Write property)
OverlayMBS.MouseDown(x as integer, y as integer) as boolean
event, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: This event is called when the user clicks with the mouse inside the window.
Notes: Return true if you handled this event.
OverlayMBS.MouseDragged(x as integer, y as integer) as boolean
event, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: This event is called when the user moves the mouse over the window while the mouse is pressed.
Notes: Return true if you handled this event.
OverlayMBS.MouseMoved(x as integer, y as integer) as boolean
event, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: This event is called when the user moves the mouse over the window.
Notes: Return true if you handled this event.
OverlayMBS.MouseUp(x as integer, y as integer) as boolean
event, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: This event is called when the user releases the mousebutton inside the window.
Notes: Return true if you handled this event.
OverlayMBS.Move(left as integer, top as integer)
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Moves the window on the screen to the given position.
OverlayMBS.Pict as Picture
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The picture for the window content.
Notes:
You need to provide your own picture here.
Pict and Mask pictures must have the same size.
(Read and Write property)
OverlayMBS.Resize(width as integer, height as integer)
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Resizes the window.
Notes: You need to provide bigger picture before you call this method.
OverlayMBS.Show(WindowsShowMode as integer = 0)
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

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
OverlayMBS.Top as Integer
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: 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
Notes: (Read and Write property)
OverlayMBS.Update
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

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.
OverlayMBS.UpdateShow
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Shows the window and performs an update.
Notes: Runs Update and Show internally.
OverlayMBS.Visible as Boolean
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Whether the window is visible.
Example:
dim o as OverlayMBS
// ....
o.visible=true
Notes:
True if visible, false if hidden.
(Read and Write property)
OverlayMBS.Width as Integer
property, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 8.6, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The width of the window.
Notes: (Read and Write property)
OverlayMBS.WinAnimateWindow(Flags as integer, Time as integer=200) as boolean
method, Window, MBS REALbasic Overlay Plugin (Overlay), class OverlayMBS, Plugin version: 9.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The AnimateWindow function enables you to produce special effects when showing or hiding windows.
Notes:
There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade.

self: The window to animate. The calling thread must own this window.
Time: Specifies how long it takes to play the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play.
Flags: Specifies the type of animation. This parameter can be one or more of the following values. Note that, by default, these flags take effect when showing a window. To take effect when hiding a window, use AW_HIDE and a bitwiseor operator with the appropriate flags.

AW_SLIDE = &h040000Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER.
AW_ACTIVATE = &h020000Activates the window. Do not use this value with AW_HIDE.
AW_BLEND = &h080000Uses a fade effect. This flag can be used only if hwnd is a top-level window.
AW_HIDE = &h010000Hides the window. By default, the window is shown.
AW_CENTER = &h10Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. The various direction flags have no effect.
AW_HOR_POSITIVE = 1Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_HOR_NEGATIVE = 2Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_POSITIVE = 4Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_NEGATIVE = 8Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.

Return Value:
If the function succeeds, the return value is true.
If the function fails, the return value is false.
The function will fail in the following situations:
  • If the window uses the window region. Windows XP: This does not cause the function to fail.
  • If the window is already visible and you are trying to show the window.
  • If the window is already hidden and you are trying to hide the window.
  • If there is no direction specified for the slide or roll animation.
  • When trying to animate a child window with AW_BLEND.
  • If the thread does not own the window. Note that, in this case, AnimateWindow fails but GetLastError returns ERROR_SUCCESS. To get extended error information, call the GetLastError function.

To show or hide a window without special effects, use Show.
When using slide or roll animation, you must specify the direction. It can be either AW_HOR_POSITIVE, AW_HOR_NEGATIVE, AW_VER_POSITIVE, or AW_VER_NEGATIVE.
You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE or AW_VER_NEGATIVE to animate a window diagonally.
The window procedures for the window and its child windows should handle any WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT.
If a child window is displayed partially clipped, when it is animated it will have holes where it is clipped.
AnimateWindow supports RTL windows.
Avoid animating a window that has a drop shadow because it produces visually distracting, jerky animations.

Previous items

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




Links
MBS REAL studio Plugins - Nachhilfe in Mendig