Description
Represents a form in the SAP Business One application.
The form is identified by its unique ID, but only for the lifecycle of the form.
Object Model
Example
| Adding forms and items, binding items to data (Visual Basic) | Copy Code |
|---|
Public Sub CreateSimpleForm()
Dim oForm As SAPbouiCOM.Form
Dim oItem As SAPbouiCOM.Item
Dim oButton As SAPbouiCOM.Button
Set oForm = SBO_Application.Forms.Add("SimpleForm", ft_Fixed)
oForm.Title = "Simple Form"
oForm.Left = 400
oForm.Width = 300
oForm.Top = 100
oForm.Height = 100
Set oItem = oForm.Items.Add("1", it_BUTTON)
oItem.Left = 5
oItem.Width = 65
oItem.Top = 50
oItem.Height = 19
Set oButton = oItem.Specific
oButton.Caption = "Ok"
Set oItem = oForm.Items.Add("2", it_BUTTON)
oItem.Left = 75
oItem.Width = 65
oItem.Top = 50
oItem.Height = 19
Set oButton = oItem.Specific
oButton.Caption = "Cancel"
End Sub |
|
See Also