Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Animate Window
Function:
Required plugins for this example: MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/Animate Window
This example is the version from Sun, 17th Mar 2012.
Project "Animate Window.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() 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. SecondWindow.hide flags=BitwiseOr(AW_SLIDE, AW_HOR_POSITIVE) if SecondWindow.WinAnimateWindowMBS(flags, 1000) then SecondWindow.show else MsgBox "Animatin failed." end if End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() 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. SecondWindow.hide flags=AW_BLEND if SecondWindow.WinAnimateWindowMBS(flags, 1000) then SecondWindow.show else MsgBox "Animatin failed." end if End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action() 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. SecondWindow.show flags=BitwiseOr(AW_HIDE, AW_BLEND) if SecondWindow.WinAnimateWindowMBS(flags, 1000) then SecondWindow.Hide else MsgBox "Animatin failed." end if End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class SecondWindow Inherits Window
End Class
End Project

Feedback, Comments & Corrections

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




Links
MBS FileMaker tutorial videos