cancel
Showing results for 
Search instead for 
Did you mean: 

Add Form which is created by VB.net into SBO

Former Member
0 Kudos

Hi my gurus,

I create a form by VB.net, pls tell me how to add it in to SBO to use it as another form in SBO. I'm using SBO 2005A. If you have code, pls share to me. Thanks !!!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184566
Active Contributor
0 Kudos

Hi Andy

You are specific enough. You need to create your form through code or create an xml file that is then loaded.You must use sap objects to build sap forms.

here is a sample of building a form

Private Sub DrawForm()

Dim cp As SAPbouiCOM.FormCreationParams

Dim oForm As SAPbouiCOM.Form

Try

cp = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)

cp.UniqueID = "UI"

cp.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed

Try

oForm = SBO_Application.Forms.AddEx(cp)

Catch ex As Exception

SBO_Application.MessageBox("Form is open already")

End Try

oForm.ClientWidth = 400

oForm.ClientHeight = 150

oForm.Left = 290

oForm.Top = 210

oForm.AutoManaged = True

oForm.Visible = True

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

End Sub

Once you are able to create a form you need to add it to the menu, catch the menu event and then open the form.

Hope this helps

Former Member
0 Kudos

Thanks Louis, but I mean that Form I designed by VB.Net, how to do it become SAP object (not design again through code or xml file). Becouse many items in the Form I don't know how to build SAP form by code. Can not !?!?!?!? Thanks for your replies.

former_member184566
Active Contributor
0 Kudos

Hi Andy

Go to https://www.sdn.sap.com/irj/sdn/developerareas/businessone and click on "Catalog of Add-Ons for SAP Business One 2005". It has an example of exactly what you are looking for. They use a VB form inside sap, they even made it look like a sap form but obviously with vb controls.

Hope this helps