472,122 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.


Hi all,
Do any body know how to resize a control from its center in vb6?

Like if we do like this in a delayed loop:
Expand|Select|Wrap|Line Numbers
  1. image1.width=image1.width+10
  2. image1.height=imag1.height+10
It will resize the image to the right side not from the center..

The second is how to rotate some control on some angle like we can do with the lines..

Mar 29 '09 #1
7 1509
8,127 Expert 4TB
1. you need to handle the left and right properties as well for resizing from center.
2. you need to use trigonometric functions SIN & COS for the rotation.
Mar 30 '09 #2
Do Sin and Cos functions can be applied on an image control?????

I dont think so?
Mar 30 '09 #3
236 100+
Try this....

'get center coordinates in x and y initially
'change dimensions
'set position so that center is same
Mar 30 '09 #4
236 100+
i too dont think we can use SIN and COS for an image control..to rotate an image we have to extract every pixel color data..
Mar 30 '09 #5
Actually i m trying to make animation like Bounce. On mouse up it bounces up and again bounces down.

Any Example will helpfull..
Mar 30 '09 #6
236 100+
For a ball bounce animation,you can just change the top property of the ball picture gradually in a timer...increase top property to make the ball move down and decrease it to make the ball move up.Do not change the left property of the picture.
You can also add elastic effect to the ball by reducing the height of the picture exactly at the moment when the ball reaches bottom position of bouncing.
Apr 1 '09 #7
If you have experienced rocket dock or object dock there is an zoom effect i want the exactly thing but with out smooth animation..

The anim you are saying is different...

Apr 1 '09 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Michel Gaudry | last post: by
1 post views Thread by Garry Gaves | last post: by
1 post views Thread by dzemo | last post: by
1 post views Thread by DrXavier | last post: by
2 posts views Thread by Mike Stolkes | last post: by
14 posts views Thread by Mark | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.