cancel
Showing results for 
Search instead for 
Did you mean: 

avoid "close all windows" form

Former Member
0 Kudos
74

Hello guys,

I'm just working on an add-on where there is the need to create several user defined tables and user defined fields at the beginning.

During the creation, the B1-user gets the form "Database has been modified, close all windows" (no quote)

And if he presses "Yes" to close all windows this could cause errors in the add-on.

So my question is:

Is there any possibility to get this form only ones (right after I finished creating the tables)

Thanks in advance and

Best regards,

Mario

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mario,

Take a look at the progressbar object. While a progressbar is active, a user can't interact with the GUI. I use this method also with my initialisations, works like a charm!

<b>Code (C#):</b>

/* Create a progressbar (10 steps, cancel button disabled) */
ProgressBar pbProgress = m_SBOApplication.StatusBar.CreateProgressBar("Creating user tables", 10, false);
pbProgress.Value = 1;

/* Create a user table and set the progressbar value */
pbProgress.Value = 4;

/* Create another user table and set the progressbar value */
pbProgress.Value = 8;

/* Stopping the progressbar */
pbProgress.Stop();
pbProgress = null; /* <-- IMPORTANT! */

Hope it helps,

Rowdy

Former Member
0 Kudos

Hi Rowdy,

Thanks for the tip, I will keep it in mind! Such an easy way to overcome that problem. Well done!

Adele

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mario,

You can also use this. Before you start creating the UDF and UDT, you set:

oSBOApplication.MetadataAutoRefresh = False

This is made just to avoid that window.

After you've finished the creation of metadata:

oSBOApplication.MetadataAutoRefresh = True

Hope this helps,

Ian