FolderBrowserDialog error!

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
This topic is 8 years and 6 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
paulocassuncao
Posts: 4
Last visit: Mon Sep 28, 2015 1:43 pm

FolderBrowserDialog error!

Post by paulocassuncao »

Hi, I'm testing Powershell Studio 2015 and trying to migrate some of my scripts to visual GUI but every time I use "folderbrowserdialog" component on any of my forms my application freezes when I click the button to call the folderbrowserdialog.

When I run the project inside PStudio it works well, but when I build and generate .exe the error happens.

I try to make a new project and put only this component and application still freezes when I click in the buttonBrowseFolder (at .exe). Same happens when I use the control set "Text Box - Browse for file"

Am I missing something here? There is any prerequisites do use this component?

I'm using PStudio 2015 4.2.93 (64 bits)

PS: Sorry about my bad english... :oops:
User avatar
SAPIEN Support Forums
Posts: 945
Last visit: Thu Oct 22, 2015 1:10 pm

FolderBrowserDialog error!

Post by SAPIEN Support Forums »

This is an automated post. A real person will respond soon.

Thank you for posting, paulocassuncao.

Did you remember to include the following?
  • 1. Product, version and build (e.g. Product: PrimalScript 2014, Version & Build: 7.0.46. Version and build information can be found in the product's About box accessed by clicking the blue icon with the 'i' in the upper right hand corner of the ribbon.)
    2. Specify if you are running a 32 or 64 bit version
    3. Specify your operating system and if it is 32 or 64 bit.
    4. Attach a screenshot if your issue can be seen on the screen
    5. Attach a zip file if you have multiple files (crash reports, log entries, etc.) related to your issue.
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: FolderBrowserDialog error!

Post by davidc »

All the dialog controls require STA (Single Threaded Apartment) mode. All you have to do is check the STA mode check box in the Packager Settings:
Packager STA Option.png
Packager STA Option.png (53.5 KiB) Viewed 3910 times
As a general rule, you will want to keep this option checked when working with GUI scripts.

David
David
SAPIEN Technologies, Inc.
User avatar
paulocassuncao
Posts: 4
Last visit: Mon Sep 28, 2015 1:43 pm

Re: FolderBrowserDialog error!

Post by paulocassuncao »

Worked like a charm, thanks a lot!
This topic is 8 years and 6 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.