Skip to Content
0
Former Member
Jul 07, 2015 at 03:40 AM

How to use LayoutKeyEvent in vb.net?

119 Views

Hi All

I'm trying to view my crystal report on my form but i stuck on how to Add Layout Key Event Handler.

below is my code in vb.net. what is i missing?

when i debug on line

B1Connections.theAppl.LayoutKeyEvent = New _IApplicationEvents_LayoutKeyEventEventHandler(AddressOf theAppl_LayoutKeyEvent)

It show error "Public member 'LayoutKeyEvent' on type 'ApplicationClass' not found."


anyone please help me



<B1Listener(BoEventTypes.et_FORM_LOAD, False)> _

Public Overridable Sub OnAfterFormLoad(ByVal pVal As ItemEvent)

Dim ActionSuccess As Boolean = pVal.ActionSuccess

Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

'ADD YOUR ACTION CODE HERE ...

B1Connections.theAppl.LayoutKeyEvent = New _IApplicationEvents_LayoutKeyEventEventHandler(AddressOf theAppl_LayoutKeyEvent)

End Sub

Private Sub theAppl_LayoutKeyEvent(ByRef eventInfo As LayoutKeyInfo, ByRef BubbleEvent As Boolean)

BubbleEvent = True

eventInfo.LayoutKey = "1"

End Sub

Thanks,

Vita