AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

Can I stretch a picture with a Visual Basic command?

Yes. With the PaintPicture-method, you can copy and resample pictures, for example :

Private Sub Form_Load()
picOld.AutoSize = True
picNew.Width = picOld.Width * 2
picNew.Height = picOld.Height * 2
picNew.AutoRedraw = True
picNew.PaintPicture picOld.Picture, 0, 0, picNew.ScaleWidth, picNew.ScaleHeight, 0, 0, picOld.ScaleWidth, picOld.ScaleHeight
End Sub

The picture in picNew will have twice the size of picOld. Make sure that the ScaleMode of picOld the same is as the ScaleMode of picNew

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/