ComponentOne List 8.0 for ActiveX
PostEvent Event

 

PostEvent Event

The PostEvent event is used in conjunction with the PostMsg method to postpone operations that are illegal within the control's events.

Syntax

object_PostEvent (ByVal MsgId As Integer)

Arguments

MsgId is an integer that identifies the message posted by the PostMsg method.

Remarks

Event applies to TDBList and TDBCombo controls.

If the PostMsg method is called, the control will fire the PostEvent event with the MsgId of the corresponding PostMsg invocation after all pending operations are completed. You can then safely perform all desired operations in the PostEvent event.

The special case where MsgId is zero is used to clear any pending PostMsg invocations that have not yet been processed. A PostEvent event will fire for this case.

The following code illustrates a typical PostEvent handler:

Private Sub TDBList1_PostEvent(ByVal MsgId As Integer)

Select Case MsgId

    Case 0

        Exit Sub

    Case 1

        Data1.Refresh

    Case 2

        ' Process other postponed operations

End Select

End Sub

Note: Take care to avoid recursive situations when using PostMsg and PostEvent.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback