simonwait
asked on
Rotate two independant objects around circle VB6
Hi,
I am trying to make a user control which displays the position of two objects on the circumference of a circle. The image shows the idea I am trying to show. Essentially a dotted circle with the two objects (shown in this as red and green and deliberately different sizes). I am tring to show that if the objects were both at the top of the circle and splitting the "pole" then they would be at a rotational value of 0, if either object goes clockwise then it heads in a positive rotation and a negative if it went anti clockwise. Has anyone got any thoughts how best to tackle this?
Thanks
Capture.JPG
I am trying to make a user control which displays the position of two objects on the circumference of a circle. The image shows the idea I am trying to show. Essentially a dotted circle with the two objects (shown in this as red and green and deliberately different sizes). I am tring to show that if the objects were both at the top of the circle and splitting the "pole" then they would be at a rotational value of 0, if either object goes clockwise then it heads in a positive rotation and a negative if it went anti clockwise. Has anyone got any thoughts how best to tackle this?
Thanks
Capture.JPG
I've no idea how it would be accomplished but why a user control? It seems too specific to be generally useful.
ASKER
It will be incorperated into a few projects and I am going to add a few property bag variables to it
I just Googled rotation around a circle vb6 and got a bunch of hits including this one.
ASKER
Yeah I found a couple of things for rotation images but one of my issues was with the shapes or which I could only seem ti think of as arcs but everything in google reverts to VB.NET
ASKER
Have to admit though there is some interesting stuff in the link you found...didnt show up in my searches
Stand By.,...looking into this.
I would think you could just draw everything by computing points around the circle using the standard Cos() and Sin() formula. You could connect to the last point to make it look like a polygon (more points = smoother).
I made a user control to rotate the two objects.
I'll post it soon.
I'll post it soon.
ASKER
ooo...the race is on between vb_elmar and craisin. Thanks chaps!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry I have been too ill to work on this (or anything else) for the past 24 hours.
If vb_elmars solution does not work out, I will get back to it, but I am confident his "Add-On" SDK experience will shine through in his solution and provide what you want. :-)
Gut gemacht, Herr vb_elmers!
Cheers
Chris
If vb_elmars solution does not work out, I will get back to it, but I am confident his "Add-On" SDK experience will shine through in his solution and provide what you want. :-)
Gut gemacht, Herr vb_elmers!
Cheers
Chris
ASKER
Sorry I thought I had accepted this already but obviously not! Thanks very much for this solution it works very well and I have added a few of my own things onto this control to make it perfect for our needs.
Craisin I hope you are back to tip top form so you can bail me out again in the near future!
Craisin I hope you are back to tip top form so you can bail me out again in the near future!