gray out button based on user ID

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 4 years and 9 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.
Locked
User avatar
mqh77777
Posts: 252
Last visit: Mon Feb 26, 2024 10:07 am
Has voted: 1 time

gray out button based on user ID

Post by mqh77777 »

Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.163
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.17763.0

How do you gray out a button based on user ID? I only want a handful of users to be able to press a certain button on a form.
Thank you.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: gray out button based on user ID

Post by jvierra »

Just disable the button when the form loads based on a list of users OR … selectively enable buttons based on a user list.
This topic is 4 years and 9 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.
Locked