The Construct method tells Voxler which command to create. The Construct method is accessed from the CommandApi object. The ShowWindow type changes the display size of the Voxler window.
The Construct method must be used in combination with the Option method and the Do or DoOnce method to create an object.
Syntax
object.Construct(“ShowWindow”)
Construct Type
ShowWindow
Parameter |
Type |
Description |
ShowWindow |
String |
Set the ShowWindow to Maximize, Minimize, Normal, or Default. Maximize – largest window possible Minimize – minimized to Windows task bar Normal – normal size Default – predefined default window size |
Example
This example opens a new Voxler file. It then changes the display of the Voxler window. It first displays the default Voxler window, then minimizes, maximizes, and displays the normal window.
Sub Main
'Declares VoxlerApp as an object
Dim VoxlerApp As Object
'Creates an instance of the Voxler application object
'and assigns it to the variable named "VoxlerApp"
Set VoxlerApp = CreateObject("Voxler.Application")
'Make Voxler visible
VoxlerApp.Visible = True
'Access CommandApi
Set CommandApi = VoxlerApp.CommandApi
'Create a new Voxler document
CommandApi.Construct ("New")
CommandApi.DoOnce()
'Show the default Voxler window
CommandApi.Construct("ShowWindow")
CommandApi.Option ("ShowWindow", "Default")
CommandApi.Do()
'Wait 2 seconds
Wait(2)
'Minimize the Voxler window
CommandApi.Construct("ShowWindow")
CommandApi.Option ("ShowWindow", "Minimize")
CommandApi.Do()
'Wait 2 seconds
Wait(2)
'Maximize the Voxler window
CommandApi.Construct("ShowWindow")
CommandApi.Option ("ShowWindow", "Maximize")
CommandApi.Do()
'Wait 2 seconds
Wait(2)
'Display the normal Voxler window
CommandApi.Construct("ShowWindow")
CommandApi.Option ("ShowWindow", "Normal")
CommandApi.Do()
End Sub
Used by: CommandApi object
See Also