cancel
Showing results for 
Search instead for 
Did you mean: 

Specify opening position of Form

former_member231954
Participant
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor

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

Answers (1)

Answers (1)

pedro_magueija
Active Contributor

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

Pedro Magueija

LinkedIn | Twitter | Blog

former_member231954
Participant
0 Kudos

Do you usually create a UDO for a form your addon creates?

pedro_magueija
Active Contributor

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