![]() |
|
[.NET] [TUT]Making a Custom Button easily[TUT] - 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: [.NET] [TUT]Making a Custom Button easily[TUT] (/showthread.php?tid=1193840) |
[TUT]Making a Custom Button easily[TUT] - Vertu - Apr 7, 2011 [IMG]http://www.[censored].net/uploads/1d26029562.gif[/IMG] ow to do that WITHOUT using any images? We just need 1 Button (of course), 2 events for calling our function, and our same Function from before (which is here slightly modified). Here is the Function, I call it this time PaintGradient. Code Public Sub PaintGradient(ByVal aControl As Control, ByVal Color1 As Color, ByVal Color2 As Color, _Now we will use 2 events from our Button, MouseEnter and MouseLeave Code Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnterThat's it, you are done. :lol: * - Cody8295 - Apr 7, 2011 (Apr 7, 2011 01:49 PM)Vertu Wrote: ow to do that WITHOUT using any images? Technically this is using images. Hence the bitmap. * - no1me - Apr 7, 2011 why not PHP Code * - Vertu - Apr 7, 2011 (Apr 7, 2011 01:52 PM)Cody8295 Wrote: Technically this is using images. Hence the bitmap.Ok,just i you dint need to load from resources @no1me That works too 🤗 * - Cody8295 - Apr 7, 2011 (Apr 7, 2011 02:20 PM)Vertu Wrote: Ok,just i you dint need to load from resources You don't need to if you use and imagelist with local images. * - Kōtei - Apr 7, 2011 This is nice, thank you no1me for the code modification, making it simpler and such. * - Marketplace - Apr 7, 2011 I love this. I hope you make more tutorials like how to make custom background, progress bars, etc. And can't you do: Code Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter* - Aeonhack Archivist - Apr 7, 2011 (Apr 7, 2011 04:33 PM)AlphaSquad Wrote: I love this. I hope you make more tutorials like how to make custom background, progress bars, etc. All your code is doing is applying a single color. The other codes are filling with a gradient. |