folderbrowsermodrndialog

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

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 5 years and 4 days 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.
Locked
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

folderbrowsermodrndialog

Post by DaveMcDonald »

I have built a GUI but I want to restrict the context menu of folderbrowsermoderndialog. Is this even possible? I would like to remove the context menu completely. I just want the user to be able to select a folder, nothing else (they have the ability to delete a folder using the context menu).
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: folderbrowsermodrndialog

Post by jvierra »

With the Sapien control there is no access to customizing this. Use the FolderBrowserDialog to obtain more customization option.
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

Re: folderbrowsermodrndialog

Post by DaveMcDonald »

That works for what I am looking for with one exception. They can't enter a path to start. With the modern dialog you can enter a server\share then look at that path, with the standard one you cannot.
DaveMcDonald
Posts: 15
Last visit: Fri Sep 15, 2023 9:48 am

Re: folderbrowsermodrndialog

Post by DaveMcDonald »

And I need to disable the context menu. The form runs as a service account but I want the user to only browse and select a folder, no other options.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: folderbrowsermodrndialog

Post by jvierra »

Always start by reading the documentation o each control that you wish to use. THis wil tell you all of the ways it can be optioned and gives good examples.

https://docs.microsoft.com/en-us/dotnet ... work-4.7.2
This topic is 5 years and 4 days 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.
Locked