Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a rotating knob in VB how to??

Status
Not open for further replies.

electron

Electrical
Joined
Dec 6, 2000
Messages
18
Location
PR

I would like to make a Knob in VB that I can grab with the mouse pointer and rotate. Think should be started with only a line that could be rotated when grabed. I dont know but been reading about bitmaps and pixels and maybe this is the way to go. Is there an easier way to do it? I just want some general ideas.
Thanks



Rafael
 
You don't have to re-invent the wheel (or knob either)! there are a number of ocx controls available either free or for a small charge. A quick google for 'knob ocx' will find several, including:

If you want to roll your own, start with a picturebox control and a line control in that box. Use the picturebox width and height values (divided by 2) to set the line x1 and x2 coordinates and the picturebox mouse events to set the line x2 and y2 coodinates

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting
 
THANKS JOHNWM I JUST WANTED TO GO TRU THE CHALLENGE BUT LIKE YOU SAID DONT HAVE TO RE-INVENT THE KNOB.

THANKS
RAFAEL

Rafael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top