Skip to Content
0
Former Member
Dec 16, 2009 at 06:14 PM

Cannot Reopen a Screen Painter Form

41 Views

Hi all,

I try to open and then reopen a Screen painter Form without success. I see it is a common issue but I cannot find a solution. This is what I try.

Dim oXmlDoc As New MSXML2.DOMDocument ' need the reference in Solution Explorer "MSXML2"

Dim creationPackage As SAPbouiCOM.FormCreationParams

Try

' Form load and creation

oXmlDoc.load("c:\tmp\Blanket.srf")

If oXmlDoc.xml = "" Then

MessageBox.Show("Issue")

End If

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

creationPackage.UniqueID = "FBLK"

creationPackage.FormType = "2000000001"

creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable

creationPackage.XmlData = oXmlDoc.xml

oForm = SBO_Application.Forms.AddEx(creationPackage)

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

oForm = SBO_Application.Forms.Item("FBLK")

I get an exception 'Invalid Form' but the form OPENS (without functionality and if closed cannot reopen) any Idea?

Thanks,

Vangelis

Edited by: Vangelis Kanellopoulos on Dec 16, 2009 7:14 PM