VB切割图片

来源:岁月联盟 编辑:exp 时间:2011-03-08

/*Title:VB切割图片

*Author:Insun

*Blog:http://yxmhero1989.blog.163.com

*From:http://www.4safer.com/forum.php?mod=post&action=edit&fid=51&tid=423&pid=1601&page=1

*/


 

0x01.切割一个Container中的图片

  1. Private Sub Form_Activate()


  2. 详细阅读PaintPicture的说明就可了解,在来源图和目的图中,

  3. 可以指定某个特定区域来绘图,亦即可以将图片切割或放大,缩小

  4. Picture1.PaintPicture Picture, 10, 10, 1000, 1000, 0, 0, 500, 500
  5. End Sub

  6. Private Sub Form_Load()

  7. AutoRedraw = True

  8. 以下路径可能要修改

  9. Picture = LoadPicture("C:g_download.bmp")

  10. With Picture1

  11. .Left = 1000

  12. .Top = 1000

  13. .Width = 1100

  14. .Height = 1100

  15. .AutoRedraw = True

  16. End With

  17. End Sub
复制代码

QQ截图未命名1.jpg