How to rotate rectangle on form 
Author Message
 How to rotate rectangle on form

I want to create a rectangle and let the user be able to rotate the rect.
Ideally I would like to be able to use the mouse to select one corner on
rotate the control.

Does anybody know how to do this?

Thanks,

J.Ranaudo



Mon, 08 Nov 1999 03:00:00 GMT  
 How to rotate rectangle on form

Yes, I do <g>.  Here's a few hints to get you started.  

Image controls make good drag handles: you can either set dragmode = Auto
and use the drag events, or -- my preference -- just use the mouse events:
in mousedown set a variable bDragging = True, and in mousemove, if
bDragging Then... in the mouseup, bDragging = false.

The best way to draw a rotateable rectangle is with four .Line methods.
Look up some trigonometry to figure the coordinates.  Use DrawMode = XOr,
and all you have to do is draw the same lines (in the same color) a second
time in order to erase.

Hope that helps.

Jim Deutch



Quote:
> I want to create a rectangle and let the user be able to rotate the rect.
> Ideally I would like to be able to use the mouse to select one corner on
> rotate the control.

> Does anybody know how to do this?

> Thanks,

> J.Ranaudo



Mon, 08 Nov 1999 03:00:00 GMT  
 How to rotate rectangle on form

Thanks, that should be enough to get me started.

J.Ranaudo



Tue, 09 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to draw rotated rectangles in vb.net?

2. Rotate rectangle

3. Rotate Rectangle

4. Form rotate and Form flip

5. Draw rectangle on form at runtime

6. Make non-rectangle form, get the OCX from my home page

7. Rubberband Rectangle in ACCESS-Form via WinApi

8. Non-rectangle forms in VB

9. Drawing a Selection Rectangle on a Form

10. Drag an Rectangle onto a Form with hDc and API

11. Drawing Rectangles is a sub that does exploding form effect

12. Rotating the form

 

 
Powered by phpBB® Forum Software