I have an image control with a transparent gif image inside of it(I can't
use the picturebox because it is transparent), and the placement of the
image control is controlled by a timer, and the timer's interval is at 100,
and the timer moves the image 10 pixels at a time. The picture flickers with
the white part(the transparent part) flickering every other time it moves.
The last response said I should use Bitblt, but as far as I know, the
control has to have an Hdc and it moves the picture between controls, where
I want to move the control itself. Any suggestions would be great.
> I have an image control with a transparent gif image inside of it(I can't
> use the picturebox because it is transparent), and the placement of the
> image control is controlled by a timer
> The picture flickers with
> the white part(the transparent part) flickering every other time it moves.
> I want to move the control itself. Any suggestions would be great.
You won't get good graphics from windows, there always seems to be
some redrawing issues when moving controls around. You might have
better luck if you used a different type of transparent picture.
Try an icon, instead of a GIF picture, the image control supports their
transparency. For a demo add a timer and an image control then
try this code:
HTH
LFS
Private Sub Form_Load()
AutoRedraw = True
ScaleMode = vbTwips
Move Left, Top, 8000, 1300
Line (1200, 400)-Step(5600, 200), vbYellow, BF
Line (1200, 400)-Step(5600, 200), vbBlue, B
PSet (1630, 300), BackColor
Font.Size = 14
Font.Bold = True
Print "Does this image appear to flicker?"
Image1 = Icon
Image1.Move 1199, 210
Timer1.Interval = 63
End Sub
Private Sub Timer1_Timer()
Static DX As Long
Dim IX As Long
IX = Image1.Left + DX * 3 * Screen.TwipsPerPixelX
Image1.Left = IX
If IX < 1200 Then DX = 1
If IX > 6400 Then DX = -1
End Sub
"mrkkong" <mrk...@home.com> wrote in message
news:OmaBrz3#AHA.1960@tkmsftngp03...
> But VB is far from the animators dream! Use
> a language appropriate to the task!
I agree for the most part, but since DirectX now has VB support, I'm sure
you could get much better results if you're willing to brave the learning
curve.
> > But VB is far from the animators dream! Use
> > a language appropriate to the task!
>
> I agree for the most part, but since DirectX now has VB support, I'm sure
> you could get much better results if you're willing to brave the learning
> curve.
>
One of the first things I plan to 'play' with, in .Net beta2 !!!
:-)
LFS