473,241 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Animations

75
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..

Thanx
ARUZ
Mar 29 '09 #1
7 1559
debasisdas
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
EYE4U
75
Do Sin and Cos functions can be applied on an image control?????

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


'get center coordinates in x and y initially
y=image1.top+(image1.height/2)
x=image1.left+(mage1.width/2)
'change dimensions
image1.width=newwidth
image1.height=newheight
'set position so that center is same
image1.left=y-(image1.width/2)
image1.top=x-(inage1.height/2)
Mar 30 '09 #4
vdraceil
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
EYE4U
75
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
vdraceil
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
EYE4U
75
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...

Thanx
Apr 1 '09 #8

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

Similar topics

0
by: Michel Gaudry | last post by:
Hello, I want to create a svg with multiple animations. It starts with <path> describing a Triangle and it's moved with a series of <animate>. An example : <path ...> <animate .../>...
1
by: Garry Gaves | last post by:
Hi @all, I'm currently writing a VB.NET project and I want to show some animations to the user (e.g. GIF, or any other format). How can I do that? I couldn't find a appropriate control for...
1
by: dzemo | last post by:
I want to make some simple animations in program (for example when showing some piece of form or some information on click) but I don't know how. I can change left property of form but there are no...
1
by: DrXavier | last post by:
Well I have not programmed in C++ for some length of time, so I will need a reffresher. On that note, I have never really written a real world app in any language. I would like to make a platform...
4
by: Fla | last post by:
Good morning. I'd like to know if I can use for free the animations, the bitmaps and the icons inside the archive VS2005ImageLibrary.zip in the installation path of VB2005 C:\Program...
2
by: Mike Stolkes | last post by:
I have the task to make 2 or 3 simple games, probably some shot them up game (space invaders or so) and a poker game. For this I need to move things around very quickly on the screen. So that is my...
7
by: kvnsmnsn | last post by:
I've got two GIF files named "Tigger.gif" and "Angry_barbarian.gif" that contain animations that I want to display on a web page. I've written the following XHTML code which works for a fraction...
5
by: vitaminB18 | last post by:
I want to make my forms unique with animations...i want the best codes for my main menu forms and other forms to make my database projects excellent. Im a student and the best design will receive an...
14
by: Mark | last post by:
I'm making a game. I need to maintain a bunch of objects, in this case animations (explosions and stuff). I've decided to use an STL vector. From my understanding, I need to declare it as...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

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.