Skip to Content

Specify opening position of Form

I am using SAP Business One 9.2 SDK UI API (C#) and I am wondering how can I specify the opening position of a Form I created. All the system forms save their last position and window size and the next time I open them, they open in the saved position. When I create a Form in SDK and open it, it always opens at the (0,0) position (leftmost and top) and at the initial size, so the user needs to manually grab and move the form every time.

Do I need to manually implement this feature somehow?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 16, 2016 at 10:53 AM

    Hi Szalbocs,

    I usually set left = 310 and top = 10 by default. If you want implement this situation, you can create an UDT to store the formType, userID, left and top, and when you load your form, you can set the left and top based on your table.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 06:22 PM

    I'd like to add that forms linked with a UDO automatically get positioned to their last position.

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Szabolcs,

      That depends on the addon I'm creating. Usually, if the "concept" I'm modeling represents a "document" or some sort of "master data", then yes. If I'm creating a form for simple data, such as category names, then no.

      I find that for the simple data, most users don't care that the form is always centered and not on the "last position".

      For more elaborate forms (normally representing "documents"), the users tend to prefer their settings to be persisted.

      Everyone is different, so your mileage may vary.

      Pedro Magueija

      LinkedIn | Twitter | Blog