Solved

Smooth moving pictures

Posted on 1998-06-04
4
312 Views
Last Modified: 2010-05-03
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
Comment
Question by:jsilk
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 50 total points
Comment Utility
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
 

Author Comment

by:jsilk
Comment Utility
can u give some sample code?
0
 
LVL 8

Expert Comment

by:MikeP090797
Comment Utility
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
 

Author Comment

by:jsilk
Comment Utility
thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now