FormEvents Interface Reference

This interface defines the set of common form's events. More...

Inheritance diagram for FormEvents:

Inheritance graph
Collaboration diagram for FormEvents:

Collaboration graph
List of all members.

Public Member Functions

 OnCloseQuery ([in] IDispatch *Sender,[in] IDispatch *ResultPtr)
 This event occurs when the user tries to close form.
 OnClose ([in] IDispatch *Sender)
 This event occurs when the form closes.
 OnActiveControlChange ([in] IDispatch *Sender)
 This event occurs when the active control changes.
 OnHitTest ([in] IDispatch *Sender,[in] LONG x,[in] LONG y,[in] IDispatch *ResultPtr)
 This event occurs when the form requires information about specified form point.
 OnHint ([in] IDispatch *Sender,[in] IDispatch *Object)
 This event occurs when the mouse pointer moves over the an menu item or toolbar button that associated with some Action object.
 OnMinimize ([in] IDispatch *Sender,[in] IDispatch *ResultPtr)
 This event occurs when the user tries to minimize the form.
 OnMaximize ([in] IDispatch *Sender,[in] IDispatch *ResultPtr)
 This event occurs when the user tries to maximize the form.
 OnRestore ([in] IDispatch *Sender,[in] IDispatch *ResultPtr)
 This event occurs when the user tries to restore the form.
 OnCopyData ([in] IDispatch *Sender,[in] BSTR Data)
 This event occurs when the form receives WM_COPYDATA message.
 OnActivate ([in] IDispatch *Sender,[in] LONG Flags)
 This event occurs when the form activated or deactivated.
 OnEnterSizeMove ([in] IDispatch *Sender,[in] LONG Flags)
 This event occur after the form enters the moving or sizing modal loop.
 OnExitSizeMove ([in] IDispatch *Sender,[in] LONG Flags)
 This event occur after the form exited the moving or sizing modal loop.

Detailed Description

This interface defines the set of common form's events.


Member Function Documentation

OnActivate ( [in] IDispatch *  Sender,
[in] LONG  Flags 
)

This event occurs when the form activated or deactivated.

Parameters:
Sender Form.
Flags This parameter can be a one of the following values:

See also:
WindowSystemObject::ActiveForm.

WindowSystemObject::ForegroundForm.

Form::Active.

Form::Foreground.

Form::OnActivate.

Since:
1.1.14.

OnActiveControlChange ( [in] IDispatch *  Sender  ) 

This event occurs when the active control changes.

Parameters:
Sender The control that raised the event.

OnClose ( [in] IDispatch *  Sender  ) 

This event occurs when the form closes.

Parameters:
Sender The control that raised the event.

OnCloseQuery ( [in] IDispatch *  Sender,
[in] IDispatch *  ResultPtr 
)

This event occurs when the user tries to close form.

Parameters:
Sender The control that raised the event.
Return values:
ResultPtr The Result object that can be used to return an value from the event handler.
Example:

o = new ActiveXObject("Scripting.WindowSystemObject")

o.EnableVisualStyles = true

f = o.CreateForm(0,0,0,0)

f.Text = "WSO"
f.ClientWidth = 200
f.ClientHeight = 100
f.CenterControl()

Button = f.CreateButton(120,70,75,25,"Close")
Button.OnClick = CloseForm

f.OnCloseQuery = OnCloseQuery

f.Show()

o.Run()


function CloseForm(Sender)
{
        f.Close()
}

function OnCloseQuery(Sender,ResultPtr)
{
        if (f.MessageBox("Close form?","",o.Translate("MB_OKCANCEL | MB_ICONQUESTION")) != o.Translate("IDOK"))
                ResultPtr.Put(false)            
}

OnCopyData ( [in] IDispatch *  Sender,
[in] BSTR  Data 
)

This event occurs when the form receives WM_COPYDATA message.

Parameters:
Sender Form.
Data Data.
See also:
SendCopyData , PostCopyData .
Since:
1.1.9.

OnEnterSizeMove ( [in] IDispatch *  Sender,
[in] LONG  Flags 
)

This event occur after the form enters the moving or sizing modal loop.

The form enters the moving or sizing modal loop when the user clicks the form's title bar or sizing border.

See also:
WM_ENTERSIZEMOVE in MSDN.
Since:
1.1.16.

OnExitSizeMove ( [in] IDispatch *  Sender,
[in] LONG  Flags 
)

This event occur after the form exited the moving or sizing modal loop.

See also:
WM_EXITSIZEMOVE in MSDN.
Since:
1.1.16.

OnHint ( [in] IDispatch *  Sender,
[in] IDispatch *  Object 
)

This event occurs when the mouse pointer moves over the an menu item or toolbar button that associated with some Action object.

This event occurs when the mouse pointer moves over the control that has not empty Hint.

Parameters:
Sender The Form that have the Control that raised the event.
Object The Control that raised the event.

OnHitTest ( [in] IDispatch *  Sender,
[in] LONG  x,
[in] LONG  y,
[in] IDispatch *  ResultPtr 
)

This event occurs when the form requires information about specified form point.

Parameters:
Sender The control that raised the event.
x The x coordinate of the point.
y The y coordinate of the point.
ResultPtr The Result object that can be used to return an value from the event handler. The return value can be one of the following values:

OnMaximize ( [in] IDispatch *  Sender,
[in] IDispatch *  ResultPtr 
)

This event occurs when the user tries to maximize the form.

Parameters:
Sender The control that raised the event.
Return values:
ResultPtr The Result object that can be used to return an value from the event handler.
Since:
1.1.8.

OnMinimize ( [in] IDispatch *  Sender,
[in] IDispatch *  ResultPtr 
)

This event occurs when the user tries to minimize the form.

Parameters:
Sender The control that raised the event.
Return values:
ResultPtr The Result object that can be used to return an value from the event handler.
Since:
1.1.8.

OnRestore ( [in] IDispatch *  Sender,
[in] IDispatch *  ResultPtr 
)

This event occurs when the user tries to restore the form.

Parameters:
Sender The control that raised the event.
Return values:
ResultPtr The Result object that can be used to return an value from the event handler.
Since:
1.1.8.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:38 2015. (C) Veretennikov A. B. 2004-2015