>How can I turn off the system toolbars and menu when executing my main program
I have read the previous replies and I don't think that's what you want.
I am guessing you have a processing wait and you don't want folks to be able to start something new from the menus or toolbar while they are waiting.
Step 1) Use a progressbar to show that something is happening. This will keep the user at bay in most cases.
Step 2) Depends if you want to dim all toolbar buttons or not. If you do you'll need a custom 'ButtonState' property for each button, save its state (Enabled = T/F), disable it, then restore the original state when done. If you don't want to dim the buttons, set MToolBar.Enabled = .F. at the start, then = .T. when done.
Step 3) Use a 'SKIP FOR IAmDoingSomething' clause on each vulnerable menu bar or use SET SKIP on whole menu pads or popups. 'IAmDoingSomething' must be PUBLIC and available at all times; set it to .T. when processing, .F. otherwise.
The above technique can be laborious, but it preserves the look of the interface when there is a processing wait.
Note that no menus may be vulnerable to selection if you run your process from a modal form (recommended). However, watch out if you are redefining menu bars from form methods. These will be active.
John Burton
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only