Custom Form with TransparencyKey and controls

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 11 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
bgleason
Posts: 29
Last visit: Mon Oct 30, 2023 11:35 am
Been upvoted: 2 times

Custom Form with TransparencyKey and controls

Post by bgleason »

Every time I set TransparencyKey to make a custom form any control I add to it is not "clickable"... I know I am missing something, but there has to be a way you can have a custom form leveraging transparency while still having controls, textboxes and buttons and whatnot.. I want to disable the click through ability...

Thanks...
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Custom Form with TransparencyKey and controls

Post by jvierra »

I think you have some other issue unless you are setting the control to "Transparent" which effectively disables the form.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Custom Form with TransparencyKey and controls

Post by jvierra »

Also you will need to set the controls background to match the key and only those controls will be transparent. The transparent controls will not accept any input.

See this for complete details: https://msdn.microsoft.com/en-us/librar ... .110).aspx
This topic is 5 years and 11 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