Launching the file/folder browser.

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 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
StupidSexyFlanders
Posts: 107
Joined: Sun Nov 27, 2011 9:22 am

Launching the file/folder browser.

Post by StupidSexyFlanders » Thu Jun 07, 2012 9:58 am

I have been looking for this information for the past hour, but most of the search strings (e.g. 'open file') produce massive amounts of inapplicable results.

Anyway, all I want to to do is add a simple 'select file' dialog to my form. For the life of me I cannot suss out how to take the 'folderbrowserdialog' or 'openfiledialog' tools and make the functional buttons on the form.

If there is a step-by-step somewhere that I missed in my searching, please point the way! :)

edit: Failed to mention - I am using PS Studio 2012 3.0.4mbaker2012-06-07 16:59:34
Mike

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Launching the file/folder browser.

Post by davidc » Thu Jun 07, 2012 10:46 am

PowerShell Studio has two control sets can provide good examples for what you want: TextBox - Browse For File TextBox - Browse For Folder All you have to do is alter the Filter property of the OpenFileDialog or the FolderBrowserDialog depending on the Control Set. David
David
SAPIEN Technologies, Inc.

User avatar
StupidSexyFlanders
Posts: 107
Joined: Sun Nov 27, 2011 9:22 am

Launching the file/folder browser.

Post by StupidSexyFlanders » Mon Jun 11, 2012 8:21 am

Thanks! That worked well.
Mike