Platforms to show: All Mac Windows Linux Cross-Platform
method, Window, MBS REALbasic Util Plugin (WinTrans), class Window, Not console safe, Plugin version: 5.0, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Installs transparency support to a REALbasic window.
Example:
if window1.MakeTransparentMBS then
// ok
else
// failed
end if
Will return true if successfull.
The window doesn't change if you don't use the CGContextMBS property.
This function may leak memory (some bytes only).
Requires Mac OS X, Windows 2000 or Windows XP to work. The window must be a document window.
Set MacProcID of the window to 1104 and you can make it transparent without a title bar. (on Mac OS X)
This function was updated in v4.4 to support Windows.
On Realbasic 2006, please add a self. on front of the method call like in the example.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class window, Not console safe, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether there should be a content separator on a metal window.
Example:
if window1.Frame = window.FrameTypeMetal then
window1.MetalNoContentSeparatorMBS = true
end if
Indicates that no border should be drawn between the toolbar and window content. Relevant only in textured windows. Ignored in non-textured windows. Available in Mac OS X 10.4 and later for window classes that support the textured appearance.
(Read and Write computed property)
method, Window, MBS REALbasic Util Plugin (Window), class Window, Not console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: You can set or get the value of the modified state.
Example:
mainwindow.modifiedMBS=true
Requires Mac OS 8.5 or newer.
As long as you don't set modified to false the window keeps to tell you that it's modified. Not sure why, so just set modified to false early in creating the window.
Added Cocoa support in plugin version 10.0.
(Read and Write computed property)
Some examples which use this method:
method, Window, MBS REALbasic CocoaBase Plugin (NSView), class Window, Not console safe, Plugin version: 9.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Creates a NSWindow for the given REALbasic window.
Example:
MsgBox window1.NSWindowMBS.Title
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class Window, Not console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Removes any Proxy Icon from the Window.
Example:
mainwindow.RemoveWindowProxyIconMBS
Requires Mac OS 8.5 or newer.
In Realbasic 2005 and newer you need to use self. in front of the method as the propertyname alone is not accepted.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (WinTrans), class Window, Not console safe, Plugin version: 5.0, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Your window can have transparency on Mac OS X.
Example:
if window1.SetTransparencyMBS(127) then
'fine
else
'error
end if
Use values between 0 and 255.
Requires Mac OS X, Windows 2000 or Windows XP to work.
May be limited to simple windows like normal document windows.
You need to call MakeTransparent before to install transparency.
(this function was replaced in v4.4)
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class window, Not console safe, Plugin version: 8.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Sets the window structure size.
Example:
call window1.SetWindowBoundsMBS(100,100,100,100)
Returns -1 on Windows or Linux.
Returns a Mac OS error code.
method, Window, MBS REALbasic Win Plugin (Win), class Window, Plugin version: 7.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the window icon using the icon in the file.
Example:
call window1.SetWindowIconMBS(0,getfolderitem("icon.ico"),1)
Returns true on success and false on failure.
What image depths are used and supported depends on the Windows version.
Type is 0 for a small icon and 1 for a big icon.
See also:
method, Window, MBS REALbasic Win Plugin (Win), class Window, Plugin version: 7.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the window icon using the given picture with mask.
Example:
dim p as Picture
dim m as Picture
// random colored circle image
p=NewPicture(16,16,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillRect 0,0,16,16
p.Graphics.ForeColor=rgb(rnd*256,rnd*256,rnd*256)
p.Graphics.Filloval 0,0,16,16
// circle mask
m=NewPicture(16,16,32)
m.Graphics.ForeColor=&cFFFFFF // transparent
m.Graphics.Fillrect 0,0,16,16
m.Graphics.ForeColor=&c000000 // color
m.Graphics.Filloval 0,0,16,16
Canvas1.Backdrop=p // show in canvas
Canvas2.Backdrop=m
call window1.SetWindowIconMBS(0,p,m)
The mask picture ist converted to black/white.
What image depths are used and supported depends on the Windows version.
Returns true on success and false on failure.
Possible values for type:
| ICON_BIG = 1 | Set the large icon for the window. |
| ICON_SMALL = 0 | Set the small icon for the window. |
See also:
method, Window, MBS REALbasic Win Plugin (Win), class Window, Plugin version: 3.3, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the mask of a window.
Notes:
Redraw decides wether the window is redrawn after it has been changed.
Returns true if successfull.
If you want to do the same on Mac OS X, check the example projects "transparent window" and the Photoshop Splash Screen example.
On Mac OS 9 you need a solution with a WDEF Resource which is not part of the plugin collection.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class Window, Not console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: That's the icon to the window which belongs to the combination of type and creator codes.
Example:
mainwindow.SetWindowProxyIconMBS("RbBF","RBv2") // Add RB Doc Icon
Requires Mac OS 8.5 or newer.
In Realbasic 2005 and newer you need to use self. in front of the method as the propertyname alone is not accepted.
Some examples which use this method:
global method, Window, MBS REALbasic Util Plugin (Window), Not console safe, Mac OS X: Works, Windows: does nothing, Linux x86: Does nothing, Feedback.
Function: Shows all floating windows windows.
Example:
ShowAllFloatingWindowsMBS
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class Window, Console safe, Plugin version: 4.0, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Shows or hides the toolbar.
Notes: Only working on Mac OS X.
method, Window, MBS REALbasic Util Plugin (Window), class Window, Not console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Resizes the window smoothly.
Example:
dim w,h as integer
// get destination dimension
w=300
h=200
// Resize
window1.SmoothResizeMBS w,h
// Now resize via RB to make it permament.
width=w
height=h
You need to set the new size using REALbasic's Windows properties, too.
In Realbasic 2005 and newer you need to use self. in front of the method as the propertyname alone is not accepted.
Works on Cocoa on 10.4 and newer.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class window, Not console safe, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether a metal window has square corners.
Example:
if window1.Frame = window.FrameTypeMetal then
window1.TexturedSquareCornersMBS = true
else
MsgBox "Please turn window into metal frame."
end if
Indicates that a textured window should have square corners. By default, a textured window has round corners. When this attribute is set on a window, the window frame view automatically makes the grow box view opaque, and when this attribute is cleared, the window frame view automatically makes the grow box view transparent. You can change the grow box view transparency after modifying this attribute with window.GrowBoxTransparentMBS. Relevant only for textured windows; ignored in non-textured windows. Available in Mac OS X 10.5 and later for window classes that support the textured appearance.
(Read and Write computed property)
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class Window, Console safe, Plugin version: 4.0, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether the toolbar is showed in this window or not.
Notes:
Value is false on any error.
Only working on Mac OS X.
(Read and Write computed property)
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition with additional parameters.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition with rectangle.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, 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:
| kWindowZoomTransitionEffect | 1 | Finder-like zoom rectangles. Use with TransitionWindow and Show or Hide transition actions |
| kWindowSheetTransitionEffect | 2 | Zoom 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. |
| kWindowSlideTransitionEffect | 3 | Slide 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. |
| kWindowFadeTransitionEffect | 4 | Fade the window into or out of visibility. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later. |
| kWindowGenieTransitionEffect | 5 | Use 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
| kWindowShowTransitionAction | 1 | Shows 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. |
| kWindowHideTransitionAction | 2 | Hides 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. |
| kWindowMoveTransitionAction | 3 | Moves 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. |
| kWindowResizeTransitionAction | 4 | Resizes 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:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition with additional parameters.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Runs window transition with rectangle.
Notes: see other TransitionWindow method for details.
See also:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(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
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 6.5, 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:
| kWindowZoomTransitionEffect | 1 | Finder-like zoom rectangles. Use with TransitionWindow and Show or Hide transition actions |
| kWindowSheetTransitionEffect | 2 | Zoom 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. |
| kWindowSlideTransitionEffect | 3 | Slide 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. |
| kWindowFadeTransitionEffect | 4 | Fade the window into or out of visibility. Use with the Show or Hide transition actions. Available in Mac OS X 10.3 and later. |
| kWindowGenieTransitionEffect | 5 | Use 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
| kWindowShowTransitionAction | 1 | Shows 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. |
| kWindowHideTransitionAction | 2 | Hides 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. |
| kWindowMoveTransitionAction | 3 | Moves 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. |
| kWindowResizeTransitionAction | 4 | Resizes 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:
- TransitionWindowMBS(parent as window, effect as integer, action as integer) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parent as window, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
- TransitionWindowMBS(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
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, async as boolean, duration as double) as integer
- TransitionWindowMBS(parentWindowHandle as integer, effect as integer, action as integer, left as integer, top as integer, width as integer, height as integer) as integer
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (WinTrans), class Window, Not console safe, Plugin version: 5.0, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The transparency of the window on Mac OS X, Windows 2000 and Windows XP.
Notes:
1 for opaque, 0 for invisible.
Return 1 on any error. On Windows it returns always 1 as the current transparency value can't be queried.
You need to call MakeTransparent before to install transparency.
(added Windows support in version 4.4)
(Read and Write computed property)
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class window, Not console safe, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether this window has an unified title and toolbar look.
Example:
window1.UnifiedTitleAndToolbarMBS = true
This window draws its window title and toolbar using a unified appearance that has no separator between the two areas. A window may not have both UnifiedTitleAndToolbar and Metal appearance. If a window already has the metal attribute, attempting to set the Unified attribute will cause ChangeWindows to return an error, and vice versa. This constant was not added to this header file until Mac OS X 10.5, but it is actually available at runtime on Mac OS X 10.4 and later for windows of kDocumentWindowClass. However, on Mac OS X 10.5 and later, kHIWindowBitUnifiedTitleAndToolbar no longer has any effect, since all windows with toolbars now have a unified look.
(Read and Write computed property)
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class Window, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: if your window is minimized this will update the small picture inside the dock on Mac OS X.
Example:
Mainwindow.UpdateDockWindowMBS
Some examples which use this method:
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class Window, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: On Mac OS X all Windows are doublebuffered and the OS updates the screen from time to time. This method forces a screen update.
Example:
Mainwindow.UpdateNowMBS
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class Window, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: On Mac OS X all Windows are doublebuffered and the OS updates the screen from time to time. This method forces a screen update for a part of your window.
Example:
Mainwindow.UpdateNowRectMBS Mainwindow.text.left, Mainwindow.text.top, Mainwindow.text.width, Mainwindow.text.height
method, Window, MBS REALbasic Win Plugin (Win), class Window, 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.
Example:
dim flags as integer
const AW_SLIDE = &h040000 // Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER.
const AW_ACTIVATE = &h020000 // Activates the window. Do not use this value with AW_HIDE.
const AW_BLEND = &h080000 // Uses a fade effect. This flag can be used only if hwnd is a top-level window.
const AW_HIDE = &h010000 //Hides the window. By default, the window is shown.
const AW_CENTER = &h10 // Makes 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.
const AW_HOR_POSITIVE = 1 // Animates 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.
const AW_HOR_NEGATIVE = 2 // Animates 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.
const AW_VER_POSITIVE = 4 // Animates 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.
const AW_VER_NEGATIVE = 8 // Animates 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.
window2.hide
flags=BitwiseOr(AW_SLIDE, AW_HOR_POSITIVE)
if window2.WinAnimateWindowMBS(flags, 1000) then
window2.show
else
MsgBox "Animatin failed."
end if
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 | = &h040000 | Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER. |
| AW_ACTIVATE | = &h020000 | Activates the window. Do not use this value with AW_HIDE. |
| AW_BLEND | = &h080000 | Uses a fade effect. This flag can be used only if hwnd is a top-level window. |
| AW_HIDE | = &h010000 | Hides the window. By default, the window is shown. |
| AW_CENTER | = &h10 | Makes 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 | = 1 | Animates 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 | = 2 | Animates 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 | = 4 | Animates 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 | = 8 | Animates 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.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Rect), class Window, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the screen area your window uses for the close box.
Notes:
Requires Appearancelib 1.0 on Mac OS Classic.
May return nil on any error.
method, Window, MBS REALbasic Util Plugin (Rect), class Window, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the screen area your window uses for the collapse box.
Notes:
Requires Appearancelib 1.0 on Mac OS Classic.
May return nil on any error.
method, Window, MBS REALbasic Util Plugin (Rect), class Window, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the screen area your window uses for the content of the window.
Notes:
Empty if the window is collapsed.
Requires Appearancelib 1.0 on Mac OS Classic.
May return nil on any error.
Some examples which use this method:
method, Window, MBS REALbasic Util Plugin (Window), class window, Not console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether this window will cycle.
Example:
window1.WindowDoesNotCycleMBS=False
If true, this window does not participate in window cycling invoked by cmd-~ or the "Focus on Window" hotkey defined in the Keyboards preference pane. Available for all windows on Mac OS X 10.2 and later.
You can read the state on Mac Classic, but you can only change it on Mac Carbon.
Returns false on any error.
In Realbasic 2005 and newer you need to use self. in front of the method as the propertyname alone is not accepted.
(Read and Write computed property)
method, Window, MBS REALbasic Util Plugin (Rect), class Window, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the screen area your window uses for the drag box.
Notes:
Requires Appearancelib 1.0 on Mac OS Classic.
May return nil on any error.
method, Window, MBS REALbasic Util Plugin (Rect), class Window, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the screen area your window uses for the grow box.
Notes:
Requires Appearancelib 1.0 on Mac OS Classic.
May return nil on any error.
method, Window, MBS REALbasic MacOSX Plugin (MacOSX), class window, Console safe, Plugin version: 8.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether this window should appear on the active space.
Notes:
When made visible, this window is always shown in the current Space, rather than the space in which it was last visible. When activated, this window moves to the active space, rather than forcing a switch to the Space on which it was previously located. This option is typically used with modeless dialog windows such as the Quick Search window in BBEdit. This flag and the WindowVisibleInAllSpacesMBS flag should not both be set.
(Read and Write computed property)
method, Window, MBS REALbasic Util Plugin (Window), class Window, Not console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: That's the icon to the window which belongs to the file.
Example:
dim f as folderItem
f=getopenFolderItem("special/any")
if f<>nil then
window1.WindowProxyIconFileMBS=f
end if
Requires Mac OS 8.5 or newer.
In Realbasic 2005 and newer you need to use self. in front of the method as the propertyname alone is not accepted.
Added Cocoa support in plugin version 10.0.
(Read and Write computed property)
Some examples which use this method:
The items on this page are in the following plugins: MBS REALbasic CocoaBase Plugin, MBS REALbasic MacOSX Plugin, MBS REALbasic Util Plugin, MBS REALbasic Win Plugin.
Links
MBS Realbasic tutorial videos - Pfarrgemeinde St. Arnulf Nickenich