• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

Smooth moving pictures

I want to moving pictures, but when it meet (overlap) aother picture, it flashes. I want it smooth, no flash.
How to do it
0
jsilk
Asked:
jsilk
  • 2
  • 2
1 Solution
 
MikeP090797Commented:
Use the BitBlt function, instead of pictureboxes, it's much faster:

Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

0
 
jsilkAuthor Commented:
can u give some sample code?
0
 
MikeP090797Commented:
If you want to move the picture in Pic1, then set it's scalemode to pixels, and:


BitBlt form1.hdc, X, Y, Pic1.width, Pic1.Height, Pic1.hDC, 0, 0, vbSrcCopy
0
 
jsilkAuthor Commented:
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now