Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

iOS-inspired switch button

Here's my iOS-inspired switch button. Requires the GraphicsExtension.cs written by Arun Reginald Zaheeruddin.

Implemented features:
switchButton1.Enabled = true | false;
switchButton1.Checked = true | false;

Experimental:
Transparent background: switchButton1.TransparentBackgroundFix = true | false;

[Image: rKWcT80.gif]
[Image: txoH26i.gif]

Download SwitchButton.cs here
Download GraphicsExtension.cs here
[Image: Syr3DlV.png]
Cool! Nice work OP just add an animation and shadow and it will look terrific.
PS. Enable double buffering then
(Jan 24, 2017 12:11 AM)hfTP54 Wrote:  Cool! Nice work OP just add an animation and shadow and it will look terrific.
PS. Enable double buffering then

Double buffering is disabled because I was testing transparency (and transparency does not like double buffering)

As for animation I have no clue what I'm doing, and the round white switch thing has a little drop shadow
[Image: Syr3DlV.png]
Nice Op, I also drew two similar switches like this in two of my projects maybe I'll release one of them in time.
Keep it up buddy.
[Image: narwinsig.gif]
(Jan 24, 2017 12:13 AM)gigajew Wrote:  Double buffering is disabled because I was testing transparency (and transparency does not like double buffering)
Look here: stackoverflow.com/questions/9358500/making-a-control-transparent

(Jan 24, 2017 12:13 AM)gigajew Wrote:  As for animation I have no clue what I'm doing, and the round white switch thing has a little drop shadow
Look here(by me🤝🎉):
hackforums.net/showthread.php?tid=5208432

Just set the beginning and ending x-coord of your circle as beginning and ending value,done.

Just a little more shadow please!
(Jan 24, 2017 10:36 AM)hfTP54 Wrote:  Just set the beginning and ending x-coord of your circle as beginning and ending value,done.

Wow. share more of your wisdom, master.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by LeonieHackPetaBytes2Jan 23, 2019 05:10 PM 1 227 Jan 23, 2019 05:10 PM
Last Post: 0xDEAD10CC
[.NET] by Joey97MQDec 3, 2014 02:42 PM 3 397 Dec 3, 2014 02:42 PM
Last Post: Joey97MQ
[.NET] by prologikusAug 9, 2014 02:30 AM 2 167 Aug 9, 2014 02:30 AM
Last Post: prologikus