Soothening images while mooving them

03-29-2003, 04:02 PM
I have a Image control and I move it over a elliptic trajectory , and I noticed some unwanted effects.
From time to time, the immage dissapears and then reappears (very fast, but visible and disturbind).
Anyone knows how I can move it more smoothly without those unwanted effects.
Also -- anyone knows how I can make a form go to fullscreen ?

03-30-2003, 09:30 AM
If you want maximize your form over whole the screen and without the titlebar and task bar you need to set:


03-30-2003, 04:40 PM
what u have to do is set the scalewith to some large mutiple of ten (this lets you set increments that u can move the shape - it can be anyvalue FYI a value of 100 here will give u away of getting the PERCENTAGE of the screen that a control is on the screen ie left = 98 will make the object 98% of the way accross the screen)

all you have to do is move the sahpe very small ammounts more regulary - this will minamise distortions

03-30-2003, 08:22 PM
Images will flicker, especially when moving. Pictureboxes flicker less, but for best results, you can use bitblt to paint your objects on a backbuffer, then paint the backbuffer to the foreground in one operation.

True backbuffering involves setting up a 2 blocks of memory for a windows graphics. One block is in view while the other (the backbuffer) is being painted with graphics. When it is ready, a simple command switches the block used by the window so that the backbuffer is now in view and the other block becomes the backbuffer.

A simpler way to do much the same thing in VB is to turn the AutoRedraw property on for the form or picturebox. This creates a hidden block of memory which stores the graphics of the window. This block is used to repaint the window when required (eg. if another window moves in front of the window, then leaves). When you turn AutoRedraw on, all drawing operations act on the "backbuffer". Even the hDC property refers to this backbuffer instead of the actual visible window. When drawing is done, it will be used when required (eg. if the window is obscured then made visible again) but a more convenient method is to simply call the REFRESH method to force a repaint.

Note that this isn't the same as a true backbuffer system because the repaint operation involves copying the entire contents of the backbuffer to the foreground whereas a true backbuffer system merely swaps addresses. Still, it's pretty fast and should virtually eliminate flicker.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum