Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Smooth moving pictures

Posted on 1998-06-04
4
Medium Priority
?
330 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 200 total points
ID: 1462574
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
ID: 1462575
can u give some sample code?
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1462576
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
ID: 1462577
thanks
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

886 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