Type | Description | |||
Parameter as Long | A long expression that specifies the index of the parameter to be accessed. The HostEventParam(-1) property returns the count of parameters for current event. | |||
Variant | A Variant value that indicates the value of the event's parameter. |
The following VB sample displays information about the host's events:
Private Sub G2Host1_HostEvent(ByVal EventID As EXG2HOSTLibCtl.HostEventEnum) Debug.Print G2Host1.HostEventParam(-2) End Sub
The following VB sample displays a message box, before pressing the Delete key, and cancel the operation if user selects No or Cancel:
Private Sub G2Host1_HostEvent(ByVal EventID As EXG2HOSTLibCtl.HostEventEnum) If (EventID = exHostKeyDown) Then If (vbKeyDelete = CInt(G2Host1.HostEventParam(0))) Then If Not (MsgBox("Do you want to delete?", vbYesNoCancel) = vbYes) Then G2Host1.HostEventParam(0) = 0 End If End If End If End SubYou can disable completely deletion by removing the exHostAllowDelete flag from the HostReadOnly property.