FolderBrowserDialog and FileOpenDialog Problems

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
kryten
Posts: 45
Last visit: Fri Dec 25, 2020 7:46 am

FolderBrowserDialog and FileOpenDialog Problems

Post by kryten »

Hi,

I'm wondering if anyone has seen this before? This is happening all the time now and it's killing me...

I can be working on a form that has a folderbrowser or a fileopen dialog - all working perfectly.... then, without even making a change to the script or the form, suddenly the folderbrowser or fileopendialog doesn't spawn a windows browser. Clicking my button under which the code is:

$FileOpenDialog.Show()

Nothing happens. That's the form now unusable.

The only way round it is to start a new form. A new form with all exactly the same code pasted in works fine.... for maybe an hour or two then the same thing happens. Rebooting etc will NOT allow that form to work. It has to be a new project.

Like I say this is really killing me and I'd appreciate any ideas.

W7 Enterprise x86
Just in the process of upgrading to the latest version of PS Studio.

Has this issue been seen before?

Thanks,
Stuart
User avatar
kryten
Posts: 45
Last visit: Fri Dec 25, 2020 7:46 am

Re: FolderBrowserDialog and FileOpenDialog Problems

Post by kryten »

Just upgraded to 3.1.24 and its exactly the same.

A form which was working fine. Suddenly (obviously 'something' is happening, but its hidden from me) becomes unusable as the calls to openfiledialog and folderbrowser just stop working.

Create a new form and paste in the same code. Works fine.... but is devasting from a workflow perspective....

I appreciate it must be something to do with my set-up ... but any suggestions?

Thanks,
Stuart
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: FolderBrowserDialog and FileOpenDialog Problems

Post by davidc »

Do you mean ShowDialog?
PowerShell Code
Double-click the code block to select all.
$folderbrowserdialog1.ShowDialog()
If you email the pff to support@sapien.com we can take a look at it.

Also make sure you use STA mode when running the script.

David
David
SAPIEN Technologies, Inc.
This topic is 10 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.