BasicNoUIObjInEvent Property |
Gets the in event status.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic bool InEvent { get; }
Public ReadOnly Property InEvent As Boolean
Get
public:
virtual property bool InEvent {
bool get () sealed;
}
Property Value
Boolean
The in event status.
Implements
IBasicNoUIInEvent
Remarks
The InEvent property helps insure that the container is
not destroyed while executing from a WinWrap Basic event.
Don't destroy the container if InEvent is True.
Setting
|
Description
|
---|
True
|
Executing application code from inside a WinWrap Basic event.
|
False
|
Not in any WinWrap Basic event.
|
Example
Provide a delayed form close to assist in an orderly shutdown:
private void timer1_Tick(object sender, System.EventArgs e)
{
if (!basicIdeCtl1.InEvent)
{
timer1.Enabled = false;
Close();
}
}
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
' poll the idectl until InEvent returns False
' only then is it okay to close the form containing the idectl
If Not BasicIdeCtl1.InEvent Then
Timer1.Enabled = False
Close()
End If
End Sub
private: System::Void timer1_Tick(System::Object ^ sender, System::EventArgs ^ e)
{
if (!basicIdeCtl1->InEvent)
{
timer1->Enabled = false;
Close();
}
}
See Also