Skip to Content
author's profile photo Former Member
Former Member

UI SDK:Call Native VB form from SAP eventhandler

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()

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()

in my main application (not in the eventhandler) it works fine.

Any good ideas?


Jesper Carstensen

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2004 at 12:18 PM


    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.


    Yaniv G.

    SDK Consultant,

    SAP Manage Israel.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.