在PictureBox上做水印,怎么才能让图片或然Print的文字透明?
在PictureBox上做水印,怎么才能让图片或然Print的文字透明?;就是让Print在PictureBox的文字透明或者图片透明,找了一天了,;
似乎只有alphablend()能让图片透明,但是结果不是我要的,他是把字和背景混合了,;
我需要的是背景不变,只要文字透明,这样才是我要的水印,请问有什么方法能做吗?;
对gdi这些方法又不熟悉,请各位高手们多多指教。
[此贴子已经被作者于2018-12-5 17:11编辑过]

[此贴子已经被作者于2018-12-5 19:32编辑过]

程序代码:
Private Declare Function SetBkMode Lib "gdi32.dll" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function TextOut Lib "gdi32.dll" Alias "TextOutW" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As Long, ByVal nCount As Long) As Long
Private Sub Command1_Click()
Dim strOut As String
With Me '如果要用图片框,注意改成窗体上的控件名称
SetBkMode .hdc, 1
.ForeColor = &HFF& '红色的字
With .Font
.Bold = True '粗体
.Size = 20 '文字大小
End With
strOut = "文字水印"
TextOut .hdc, 100, 100, StrPtr(strOut), Len(strOut)
End With
End Sub