Keep modal window open when folderbrowser closes - modal-dialog

I have a main Windows form which launches a modal dialog to get some configuration values which are paths.
From the modal window I launch a folderBrowser (wanting to do it for each path to be configured).
When the folderBrowser closes the modal window that launched it closes too.
This means that the user has to open the folderBrowser for each configuration setting rather than just once.
Why is the modal configuration window closing and how can I keep it open until the user has set all the parameter values?
Thanks

Ok, I answered my own question.
The trick is to intercept the closing event and test a flag which I set on the condition that all folder values are valid.
If they aren't set e.Cancel = true;

Related

Protractor - Changing the target window

I need my automation to open new tab for each describe tests.
To do so, I open a new chrome tab in the beginning of each describe, enter the wanted URL, switching back to the first tab and closes him.
openNewTab()
switchTab()
browser.close()
It works fine, but when I run it - it says that "no such window target window already closed" after it closes the first chrome tab.
I assume that it happens because the automation recognize only the first chrome tab as the "target window" (and there is the session that runs).
How can I handle it?

How to prevent VSCode from opening same file multiple times?

Assume you have index.js and service.ts in the side explorer. When I click on index.js, it opens in a view A. Then I open service.ts in a separate view B right to the first one and keep the focus in B and then click on index.js in the sidebar, it also opens in B. Can VS Code be configured such that instead of opening the file again, it switches to the already open one?
Additionally, if I really want the file open twice, I could open it a second time by double clicking it or dragging it to the view where it isnt present already.
If I understand correctly, try this setting set to true:
"workbench.editor.revealIfOpen": true,

Access 2013 maximized form

I have a problem in an Access app. I open a form and its On Open event sets it to maximized. All good. From this form I click a button that opens another form who's On Open event opens it as maximized, over top of the original form. All good. When I close the second form, the original form is no longer maximized, it is now in a window. Not good.
I can't figure out why this is or how to prevent/resolve this. What event do I need to monitor and method to call to set the original form back to maximized. I tried playing with the On Close event of the second form but couldn't find the code to alter the (already open) original form. I tried a bunch of things but no luck. Any ideas?
Set the property of both forms to pop-up,modular and you should be fine
I assume you have a DoCmd.Maximize in the Open event of the first form?
Then somewhere in the Close or Unload event of the second form (or somewhere else), there must be a DoCmd.Restore.
Is any of the forms Popup or Modal?
OK, bit of a breakthrough. What fixed it was to place DoCmd.Maximize inside the On Activate event of the first form. When the 2nd form is closed the 1st form is automatically activated and the On Activate event fires, which maximizes the form again (I'm still not really sure why this is necessary). The key was figuring our what event to base the maximize method on.
Many thanks to everyone who posted.
With your database open in Access 2007, click on the "Office Button" (that's the round button in the upper left hand corner of the Acces window).
Click on the "Access Options" at the botton right.
In the "Access Options" dialog box, click on the "Current Database" option from the list on the left.
In the "Application Options" group, locate the "Document Window options". There are two options and an check box. Select the "Operlapping Windows" option. (The "Tabbed Documents" option is the default for all Access 2007 files. For more information about this, you may want to click on the "Guide to Access 2007 User Interface" link located on the "Getting Statred with Microsoft Office Access" screen that appears when you open Access 2007 from a short cut on your desktop or from the Startup menu.)
After making the selecltion of the "Overlapping Windows" option and closisng the diaplog box, you will be prompted that you have to close the current database and reopen it for your changes to take effect. Selecting the "Overlapping Windows" option will cause Access to use the interface that you are more used to.

tinyMce function to determine if popup is already open

With tinyMce, I've got onclick code to open a plugin using this:
ed.windowManager.open(...)
Right now, it will open a 2nd, 3rd, etc. instance of this plugin window each time I click the target.
Instead, I want the onclick code to ignore the click if the window is already open. How can I detect the open window.
Here's the solution I'm going with:
I seem to have confirmed:
-- that windowManager.open() does not return a reference to the window the same way that window.open() does
-- windowManager does not have a built-in way to limit the number of instances that can be opened.
But it does have a way to add an onClose function to the plugin window:
ed.windowManager.onClose.add(function() {alert('Closing!');});
So I'll be using a variable in the onClick code to keep track of whether the popup window has been opened and closed. The onClose function will mark that variable as closed

Is there a way to handle popups during playback using Sahi Pro without each popup opening its own controller window?

I'm testing a list of links using Sahi Pro, and each link opens a popup window in which I have to assert that a few elements are available. I'm able to use _closeWindow to get rid of each popup, but I've noticed that every time a new popup loads, it opens a new Sahi controller window to execute the script within that popup. These controller windows do not close when the popups close. Before long there are so many open controller windows that test execution freezes.
Is there a way to close these controller windows programatically? Or to prevent a new one from accompanying each popup in the first place?
This can be avoided by running scripts as test suites from the command line.