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

Load Form Screen Printer in C#

Hi all,

How load a form created in screen printer in language c# ?

Exemple:

I use this function to load a form in SAP business one with language VB:

Private Sub LoadForm()

Dim oxmldoc As New Xml.XmlDocument

oxmldoc.Load("Form Name.srf")

SBO_Application.LoadBatchActions(oxmldoc.InnerXml)

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

oForm.Visible = True

End Sub

But, in C# this code not is valid.

Im need a code valid in C#.

Somebody could help?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 01, 2008 at 06:21 PM

    Welcome Fabio 😊

    i use this c# procedure to load a XML:

        private static void LoadFromXML(string FileName)
        {
            System.Xml.XmlDocument oXmlDoc = null; 
     
            try
            {
                oXmlDoc = new System.Xml.XmlDocument();
     
                // load the content of the XML File
                string sPath = null;
                sPath = System.IO.Directory.GetParent(Application.ExecutablePath).ToString();
     
                oXmlDoc.Load(sPath + "\\" + FileName);
     
                // load the form to the SBO application in one batch
                string sXML = oXmlDoc.InnerXml.ToString();
     
                globals.SBO_Application.LoadBatchActions(ref sXML);
            }
            catch (Exception er)
            {
     
            }
            finally
            {
                oXmlDoc = null;
                GC.Collect();
            }
     
        }
    

    lg David

    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.