sp; End If
If Dir(SavePath, vbDirectory) = "" Then MkDir SavePath
SavePath = SavePath & IIf(Right(SavePath, 1) <> "", "", "")
cfile = SavePath & BarCode1.Value & ".bmp"
SavePicture Picture1.Image, cfile ''将条形码保存为图像文件以便打印
Next
BarCode = t
End Sub
条形码设置窗体frmOption.frm代码如下:
Option Explicit
''条形码设置模块
Private Sub cboBig_Click()
BarCode1.Style = cboBig.ListIndex ''改变标准
End Sub
Private Sub cboDirection_Click()
BarCode1.Direction = cboDirection.ListIndex ''改变方向
End Sub
Private Sub cboLine_Click()
BarCode1.LineWeight = cboLine.ListIndex ''改变线宽
End Sub
Private Sub cboSmall_Click()
BarCode1.SubStyle = cboSmall.ListIndex ''改变样式
End Sub
Private Sub Check1_Click()
BarCode1.ShowData = Check1.Value ''是否显示数据
End Sub
Private Sub cmdChange_Click()
''设置长、宽大小
BarWidth = BarCode1.Height
BarHeight = BarCode1.Width
cmdRefresh_Click
End Sub
Private Sub cmdOK_Click()
''传送条形码设定到主界面
With frmMain.BarCode1
.LineWeight = BarCode1.LineWeight
.Style = BarCode1.Style
.SubStyle = BarCode1.SubStyle
.Direction = BarCode1.Direction
.Width = BarCode1.Width
.Height = BarCode1.Height
.ShowData = BarCode1.ShowData
Me.Hide
End With
With frmMain
&n