Visual Basic Explorer
Visual Basic Explorer
 Navigation
 Home


 Coding
 Source Code

 FAQ Center

 VB Tips

 Downloads

 ToolBox

 Tutorials

 VB Games

 VB News

 VB Award

 VB Forums



 Affiliates
 Planet Source Code

 Rent a Coder

 DirectX4VB


 Misc
 Search

 Feedback

 Advertise

 About


Need to hire
a VB coder?

Please support our sponsor:

 Home 
 Site Map 
 Forums 
 News 
 Feedback 

 

http://www.vb-helper.com/HowTo/dragpic2.zip

 
Purpose
Overlay a picture on another and allow the user to drag it using BitBlt.

 
Method
Create a mask that is black where the overlaid picture should show and white
where the background should show. Copy the mask using BitBlt with opcode
MERGEPAINT. Then copy the overlay image with opcode SRCAND.

 
The book Visual Basic Graphics Programming has more information on this kind
of graphic manipulation. See www.vb-helper.com/vbgp.htm.

 
The file http://www.vb-helper.com/HowTo/dragpic2.zip performs the same
operation using PaintPicture instead of BitBlt. This version was created
because BitBlt is roughly 10 times faster than PaintPicture. Note that it is
still fairly slow for the purpose of dragging an image around.

 
Disclaimer
This example program is provided "as is" with no warranty of any kind. It is
intended for demonstration purposes only. In particular, it does not error
handling. You can use the example in any form, but please mention
www.vb-helper.com.


Downloads

In IE right-click and select 'Save Target As...' or in Netscape right-click and select 'Save Link As...'

 

View Plain Text View Plain Text
Download Demo Project Download Demo Project
View Code Online Not Available





Home | About | What's New | Source Code | FAQ | Tips & Tricks | Downloads | ToolBox | Tutorials | Game Programming | VB Award | Search | VB Forums | Feedback | VBNews | Copyright & Disclaimer | Advertise | Privacy Policy |

Quick searches: Site Search | Advanced Site Search 

Copyright 2002 by Exhedra Solutions, Inc.
By using this site you agree to its terms and conditions
VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc.