2024年4月8日发(作者:)
VB小程序源代码:为图片添加水印文字或水印图案
' '以下是窗体代码,在 VB6 和 WinXP 调试通过
'需在窗体放置以下控件,所有控件不必设置任何属性(包括位置和大小),全部采用默认设
置:
' 1 个 文本框:Text1
' 5 个 按钮:Command1、Command2、Command3、Command4、Command5
' 6 个 下拉列表框:Combo1、Combo2、Combo3、Combo4、Combo5、Combo6
' 3 个 选择按钮:Check1、Check2、Check3
' 2 个 图片框:Picture1、Picture2
' 1 个 形状控件:Shape1
'本人原创,转载请注明文章来源:
/100bd/blog/item/
Private Type BitMap
bmType As Long '图像类型:0 表示是位图
bmWidth As Long '图像宽度(像素)
bmHeight As Long '图像高度(像素)
bmWidthBytes As Long '每一行图像的字节数
bmPlanes As Integer '图像的图层数
bmBitsPixel As Integer '图像的位数
bmBits As Long '位图的内存指针
End Type
Private Declare Function GetObject Lib "gdi32" Alias
"GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As
Any) As Long
Private Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As
Long, ByVal dwCount As Long, lpBits As Any) As Long
Private Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As
Long, ByVal dwCount As Long, lpBits As Any) As Long
Private Type tyRGB
发布评论