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.


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 1559
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

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

Similar topics

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 .../>...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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"....
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...
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...
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...
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 =...
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.