vb批量打印数据库中的照片
Private Sub Command12_Click()
Dim i As Integer
On Error GoTo ABC
ShowPrinterSetup Me
For i = 1 To Adodc1.Recordset.RecordCount
If Picture2.Picture <> LoadPicture("") Then
Printer.PaintPicture Picture2.Picture, 200, Picture1.Top + 1000
Else
MsgBox "Picture2中没有图片可打印!"
End If
Printer.EndDoc
Adodc1.Recordset.MoveNext
Next i
ABC:
Exit Sub
End Sub
相关文档:
去年曾写过一篇博文,名称叫《用VB无窗口透明Usercontrol编写透明浮动按钮》,该文有一个观点是错误的,即透明无窗口Usercontrol不支持设计时点选。其实,通过在UserControl_HitTest过程里加入HitResult = vbHitResultHit语句,就可以实现设计时的点选了,为此,修改代码如下:
'* ******************* ......
Public Class Form1
Private Sub CmdTrans_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdTrans.Click
Dim psi As New System.Diagnostics.ProcessStartInfo
Dim ftpFileName As String
psi.FileName = "ftp.exe"
psi.RedirectStandardInput = ......
VB颜色和RGB色互相转换头疼了我好一段时间,如今找到解决办法了
特别贴出来与大家共享
Type RGB
Red As String
Green As String
Blue As String
End Type
Public Function ColorToRGB(ByVal dwColor As Long) As RGB
Dim clrHex ......
今天在公司服务器上看一个老掉牙的asp程序,发现竟然调用了自定义com组件,是vb写的,封装了数据库连接与操作,文档上写这样做是为什么用户到服务器也看不到数据库的用户名与密码,也对啊,这个是财务的服务器,当然不能让我们it随便看了,呵呵!(it忽悠finance,让finance相信it看不到数据库用户名与密码,my god)由于, ......