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

2018-12-05 11:37
2018-12-05 13:43
[此贴子已经被作者于2018-12-5 17:11编辑过]
2018-12-05 16:46
这也是我用过的,然而字体还是会遮住图片。

虽然说字体换成华文彩云还能挽救一下下。

2018-12-05 18:52

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

2018-12-05 19:22
惊了惊了,



,我爱你版主,

。
2018-12-06 00:00
程序代码:
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
2018-12-07 14:01