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

Windows Form with SAP B1 Problem

Dear all,

I'm building an add-on that use some windows form.

In Menu Event i placed the code for open my windows form:

MyForm xxx = new MyForm();

xxx.WindowState = System.Windows.Forms.FormWindowState.Normal;

xxx.Visible = true;

xxx.ShowInTaskbar = true;

xxx.TopMost = true;

xxx.Text = string.Empty;

xxx.ControlBox = false;

System.Windows.Forms.Application.Run(xxx);

All works fine, but, when my form is open i can't operate on SAP.

It's like my form is modal, and until I have it open I can't do anything outside the form.

Can someone help me?

Regards

Diego

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2008 at 11:32 AM

    Hi,

    Why you are not using the screen painter to design the form instead of the windows form?

    It's the best tool for designing purpose.

    Best Regards,

    Mahendra

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mahendra,

      I know that screen painter is the "best" tool for design SAP B1 forms.

      But, I found SAP B1 SDK not so friendly, so, only for a try, i want to build my own .net form and use it with SAP.

      Regards.

      Diego

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2008 at 07:03 PM

    Hi Diego

    There's actually two ways to build an add-on, one that runs inside SAP Business One and one that runs along SB1 side but built on windows forms. You can see this clearly if you try some of the add-on samples that come along with B1. Overall, when I did the analysis I ended up with the conclusion that I was going to spend twice the work to achieve windows forms.

    First, you would have develop classes and objects that keep in communication with Business One. Second, you have to keep in mind that you cannot create, update, or delete data directly to the database unless you use the SDK provided objects and methods. Which brings you back to the SAP data sources.

    Furthermore, you can run into a bit of complexity do to the fact that to illustrate data in your form, you might have to "convert" your data. For instance, say a SAP recordset into a dataset or ADO recordset. In other words, you can end up with a bit more complex architecture the way I see it.

    Using the Screen Painter and SAP Business One tools such as the BIDE you can construct bound form (UDOs) which can even require very little coding from your part (if forms are not to be too complex). Once you get use to SAP's way handling data objects you see is a lot easier than trying the alternative.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2008 at 06:26 AM

    Hi Diego,

    Actually the problem ur facing is because of using a single thread, When ur opening ur new form open it in a new thread, this will solve ur problem.

    Check the following thread it will solve the issue..

    Problem Form Windows

    Hope it helps,

    Regards,

    Vasu Natari.

    Edited by: vasu natari on Nov 27, 2008 7:35 AM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vasu,

      thanks for your reply.

      I already found this solution and it work.

      The challenge is to build a .net form that is similar to a SAP B1 form.

      It's a little bit hard, but interesting challenge.

      I'll have succes in it I'll post my framework.

      Thanks.

      Diego

  • Posted on Oct 17, 2019 at 07:17 PM

    Hi my friend,

    have solution for this ?

    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.