Solved

Smooth moving pictures

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 68
Using "ScreenUpdating" 6 63
Send outlook email from VBS Script 2 29
VBA: copy range dynamically based on config sheet v2 3 32
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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