Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Smooth moving pictures

Posted on 1998-06-04
4
322 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

789 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