三九宝宝网宝宝绘画儿童画

怎么用VB做图片浏览器

12月22日 编辑 39baobao.com

[怎样用VB做一个图片浏览器]Public Class Form1 Dim i As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click i = i - 1 If (i...+阅读

VB6.0实现图片旋转 使用过ACDSEE的朋友一定对它的JPG图片旋转功能记忆犹新,其实我们利用VB6的先进功能,可以对任意格式的图片文件(包括JPG、GIF、BMP、ICO等)进行45度、180度旋转,确实可以和ACDSEE一较高下。 启动vb6建立一个标准exe工程,首先添加两个图片框(picture1和picture2),添加三个命令按钮command1(caption=“正常显示”)、command2(caption=“180度倒立”)、command3(caption=“45度旋转”),双击窗体,写入以下代码:PrivateConstSRCCOPY=&HCC0020 PrivateConstPi=3.14 PrivateDeclareFunctionSetPixelLib"gdi32"(ByValhdcAsLong, ByValxAsLong,ByValyAsLong,ByValcrColorAsLong)AsLong PrivateDeclareFunctionGetPixelLib"gdi32"(ByValhdcAsLong, ByValxAsLong,ByValyAsLong)AsLong PrivateDeclareFunctionStretchBltLib"gdi32"(ByValhdcAsLong, ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,ByValnHeightAsLong, ByValhSrcDCAsLong,ByValxSrcAsLong,ByValySrcAsLong,ByValnSrcWidth AsLong,ByValnSrcHeightAsLong,ByValdwRopAsLong)AsLong privateSubbmp_rotate(pic1AsPictureBox,pic2AsPictureBox,ByValtheta)'45度旋转 Dimc1xAsInteger,c1yAsInteger Dimc2xAsInteger,c2yAsInteger DimaAsSingle Dimp1xAsInteger,p1yAsInteger Dimp2xAsInteger,p2yAsInteger DimnAsInteger,rAsInteger c1x=pic1.ScaleWidth\2 c1y=pic1.ScaleHeight\2 c2x=pic2.ScaleWidth\2 c2y=pic2.ScaleHeight\2 Ifc2x

推荐阅读
图文推荐