on 06-10-2004 12:20 PM
Hi all
I am trying to call a native Visual Basic form (ie a form that does not run within SAP Business one but as an ordinary windows window) from a menu added to SAP BO with UI SDK.
In my menu event handler for my SAP BO application I instantiate the form and show it:
Private Sub con_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
Select Case pVal.MenuUID
Case "NewMenu"
If pVal.BeforeAction = True Then
myForm = New Form1()
myForm.show()
End If
End Select
End Sub
Only the window is created; the form is not populated, ie I have a "dead" window without the buttons etc that I've created on the form.
If I do
myForm = New Form1()
myForm.show()
in my main application (not in the eventhandler) it works fine.
Any good ideas?
Regards
Jesper Carstensen
Hi
It is something to do with the .NET environment.
In VB6 it works fine with the event handler.
I think the problem is with subscribing twice to get system events (both forms in same process + SAP Business One Application object)
two solutions:
1. Change the oForm.Show() to oForm.ShowDialog().
2. Open the form in a different process.
Regards,
Yaniv G.
SDK Consultant,
SAP Manage Israel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.