Hack Forums
[C] add gradient to form / remove blackbox when clicking off buttons - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] add gradient to form / remove blackbox when clicking off buttons (/showthread.php?tid=6134174)



add gradient to form / remove blackbox when clicking off buttons - going clear - Jan 16, 2021

Hi, I'm re-designing an application (just re-creating the forms in visual studio), and having a few issues.

The main one is, I need to put a gradient over the application, that goes over the images/buttons on the form, and also the background. I looked at some solutions online but they fully changed the form to a colour gradient, over the top of all images and buttons which disappeared.

I also need help fixing the buttons, as when I click off them, a black box appears around it despite me setting the border to 0.

Images:
https://imgur.com/a/n4Mcp4j - button issues
https://imgur.com/a/2zHacP1 - gradient I'd like (goes from #6619ff to #00bfff)


I'm happy to give a tip via ETH to anyone that helps me fix this.


RE: add gradient to form / remove blackbox when clicking off buttons - Xenicss - Jan 16, 2021

To get rid of the Border around the Button you gotta render the Button Smaller

Code
c#
Button1.Region = new Region(new Rectangle(3, 3, Button1.Width - 6, Button1.Height - 6));

Code
VB
Button1.Region = New Region(New Rectangle(3, 3, Button1.Width - 6, Button1.Height - 6))


Not sure about the gradient issue and im too tired to look into it gl tho


RE: add gradient to form / remove blackbox when clicking off buttons - HFDone - Jan 16, 2021

which lang you are in the C NATIVE section not C# NET