cancel
Showing results for 
Search instead for 
Did you mean: 

Making a Form as Modal Form

Former Member
0 Kudos

Dear All,

Please let me know how can I make a form as Modal Form ?

Regards,

Noor hussain

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved

Former Member
0 Kudos

Hi Noor,

I think there are two possible design.

The modal form can be mobal for the application or for a parent form.

If you want an application modal form, you simply need to test all the events coming from a form different from the modal one and interrupts the event coming from the other forms.

In the ItemEvent Handler you can write:


If Not (FormUID = "YourModalFormUID") Then
    oModalForm.Select() ' oModalForm contains the reference to your Modal Form
    BubbleEvent = False ' Interrupts the events chain
End If

In the code above, if an event comes from a different forms, simply select the modal form and interrups the events chain

If you would make a form modal for a parent form, you simply need to test if the event comes from the parent form:


If FormUID = "MyParentFormUID" Then
    oModalForm.Select()
    BubbleEvent = False
End If

Hope this helps

Carmine

Edited by: Carmine Cairo on Feb 19, 2010 5:20 PM

Former Member
0 Kudos

Hello,

You can find an example in the SDK help files, on C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\12.ModalForm directory. The Help files are disrtibuted by Paches or you can found them in the installation CD of SAP B1.

Regards,

J.