
Control creation for windows form was never so easy like its now with .Net, although it needs some math skills if you want to create self drawn control. I havent seen much of examples to create such controls so I decided to make one.
You must be familiar with slider control for windows form, my example Knob control is very much similar to that control in respect of functionality but there is major change in GUI.
- I have inherited control from UserControl class to make application simpler.
- Delegates used for event handling of value changed.
- Read carefully what is done in overriding IsInputKey method because by default using up down keys will change focus from object.
- I have created variable _IsFocused that will show if object is in focus.
- For sample I have selected Label control whose color will change when you will change value of three knob controls.
KnobControl.cs is Code for control.
Utility.cs contains important static methods used for Drawing.
Form1.cs is sample that shows use of knob Control.
However lots of checking will be required to use this control in commercial application but this sample will give you head start if you are going in that direction.

zhifeng liPosted Aug 20, 2019, 8:22 AM
Thank sir,that's what i want to learn
ankit serasiyaPosted Feb 3, 2014, 1:40 AM
thank you sir................ Greate Application
Patta PuthaPosted Aug 25, 2013, 11:56 AM
patta!!!!!
zack fPosted Aug 2, 2012, 10:52 PM
thanks a lot
Stuart RubinPosted May 13, 2011, 3:29 PM
Great article and the code runs great on the desktop. I'm trying to make a knob control work in a Windows CE, .net CF environment to no avail. Any ideas?
Martin GrassoPosted Jun 20, 2010, 10:03 PM
Grasias!!! por este control ActiveX
adolfoPosted Jun 16, 2010, 5:15 AM
very useful, thanks