吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2165|回复: 1
收起左侧

[会员申请] 申请会员: 69332748a

[复制链接]
吾爱游客  发表于 2022-1-11 19:35
1. 申请ID:  69332748a
2. 个人邮箱:81644996@qq.com
3.原创软件:天津****有限公司条形码打印程序

开发的初衷是,受公司委托,开发一个 标签打印程序 。它集 读取称重仪表的重量数据、生成标签、保存数据、写入数据、生成EXCEL表格等功能与一身。
帮助公司实现智能化标签打印,提交工作效率。

软件界面:
QQ图片20220111191945.png
软件调试界面:
QQ图片20220111193009.png

软件部分代码:
生成标签及绘制标签代码
[Visual Basic] 纯文本查看 复制代码
  Dim X1#, Y1#
    Dim ii As Long
    If Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Or Text7.Text = "" Then
        MsgBox "数据不能为空", , "提示"
        
    Else
        Picture2.Width = p22 + CLng(Text19.Text)
        BarCodeCtrl1.Width = p22 + CLng(Text19.Text)
        Picture1.Width = p11 + CLng(Text19.Text)
        Image2.Width = i11 + CLng(Text19.Text)
        
        Picture4.Visible = False
        Picture5.Visible = False
        Image3.Visible = False
        Picture1.Visible = True
        Picture2.Visible = True
        Image2.Visible = True
        
        If Check3.Value = 1 Then
            Text4.Enabled = False: Text4.BackColor = &H8000000F
        Else
            Text4.Enabled = True: Text4.BackColor = &H80000005
        End If
        BarCodeCtrl1.LineWeight = Text11.Text
        BarCodeCtrl2.LineWeight = Text11.Text
        
        p1 = CLng(Text8.Text)
        p2 = CLng(Text9.Text)
        PicTemp.Cls
        PicTemp.Font.Name = "微软雅黑"
        '==============条形码1
        ' BarCodeCtrl1.Style = 7
        
        
        BarCodeCtrl1.Direction = 0
        SHIJIAN = CStr(Format(Now, "yyyy-mm-dd hh:mm:ss"))
        Shijian2 = Replace(SHIJIAN, "-", "")
        Shijian2 = Replace(Shijian2, ":", "")
        Shijian2 = Replace(Shijian2, " ", "")
        
        TIM1 = "HM" & Shijian2 & CStr(Format(Text4.Text, "000"))
        BarCodeCtrl1.Value = TIM1
        '  BarCodeCtrl1.HDC
        Call PrintWindow(Picture2.hwnd, Picture1.HDC, 0)
        Picture1.Refresh
        Image2.Picture = Picture1.Image
        
        PicTemp.PaintPicture Image2.Picture, p1 + CLng(Text14.Text), p2 + CLng(Text15.Text), Image2.Width, Image2.Height
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 9
        ' aa = Replace(TIM1, "", " ")
        aa = ""
        For I = 1 To Len(TIM1)
            If aa = "" Then
                aa = aa & Mid(TIM1, I, 1)
            Else
                aa = aa & Text17.Text & Mid(TIM1, I, 1)
            End If
        Next I
        
        PicTemp.CurrentX = 685 + p1 + CLng(Text14.Text)
        PicTemp.CurrentY = 1105 + p2 + CLng(Text15.Text)
        PicTemp.Print aa
        
        '===============条形码2
        
        '        Picture2.Width = p22
        '        BarCodeCtrl1.Width = p22
        '        Picture1.Width = p11
        '        Image2.Width = i11
        Picture4.Visible = True
        Picture5.Visible = True
        Image3.Visible = True
        Picture1.Visible = False
        Picture2.Visible = False
        Image2.Visible = False
        
        
        BarCodeCtrl1.Direction = 0
        Select Case Combo3.Text
        Case "无味磨砂"
            YB = "20"
        Case "无味透明"
            YB = "10"
        End Select
        
        S = Split(Trim(Text2.Text), "*")
        
        If InStr(CStr(S(0)), ".") > 0 Then
            '        If Len(CStr(S(0))) = 3 Then CD = REPLCE(CStr(S(0)), ".")
            '        If Len(CStr(S(0))) = 4 Then
            '            If CLng(S(0)) > 1 Then
            '            End If
            CD = Replace(CStr(S(0)), ".", ""): CD = Mid(CD, 1, 2)
        Else
            CD = S(0) & "0"
        End If
        
        If Len(Trim(S(1))) = 4 Then
            KD = CStr(CLng(S(1)) \ 10)
        Else
            KD = "0" & CStr(CLng(S(1)) \ 10)
        End If
        
        TIM2 = "SPR" & YB & CD & KD & "TM"
        BarCodeCtrl2.Value = TIM2
        
        Call PrintWindow(Picture4.hwnd, Picture5.HDC, 0)
        Picture5.Refresh
        Image3.Picture = Picture5.Image
        
        PicTemp.PaintPicture Image3.Picture, p1 + CLng(Text13.Text), 2640 + p2 + CLng(Text12.Text), Image3.Width, Image3.Height
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 9
        ' aa = Replace(TIM1, "", " ")
        aa = ""
        For I = 1 To Len(TIM2)
            If aa = "" Then
                aa = aa & Mid(TIM2, I, 1)
            Else
                aa = aa & Text17.Text & Mid(TIM2, I, 1)
            End If
        Next I
        
        PicTemp.CurrentX = 1865 + p1 + CLng(Text13.Text)
        PicTemp.CurrentY = 3750 + p2 + CLng(Text12.Text)
        PicTemp.Print aa
        '================
        
        '    PicTemp.FontBold = True
        '    PicTemp.FontSize = 10
        '
        '    PicTemp.CurrentX = 3200 + p1
        '    PicTemp.CurrentY = 500 + p2
        '    PicTemp.Print aa
        
        '    PicTemp.FontBold = False
        '    PicTemp.FontSize = 8
        '    aa = "生产日期:" & Date$
        '    PicTemp.CurrentX = p1
        '    PicTemp.CurrentY = 3285 + p2
        '    PicTemp.Print aa
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "卷号"
        PicTemp.CurrentX = 105 + p1
        PicTemp.CurrentY = 2335 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "生产日期"
        PicTemp.CurrentX = 2515 + p1
        PicTemp.CurrentY = 2335 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = CStr(Text4.Text)
        PicTemp.CurrentX = 1035 + p1
        PicTemp.CurrentY = 2335 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        Shijian3 = Date$
        PicTemp.CurrentX = 3750 + p1
        PicTemp.CurrentY = 2335 + p2
        PicTemp.Print Shijian3
        
        '=====
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "规格"
        PicTemp.CurrentX = 105 + p1
        PicTemp.CurrentY = 1345 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "颜色"
        PicTemp.CurrentX = 2515 + p1
        PicTemp.CurrentY = 1345 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = Text2.Text
        PicTemp.CurrentX = 1035 + p1
        PicTemp.CurrentY = 1345 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = Text3.Text
        PicTemp.CurrentX = 3750 + p1
        PicTemp.CurrentY = 1345 + p2
        PicTemp.Print aa
        '=
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "花纹"
        PicTemp.CurrentX = 105 + p1
        PicTemp.CurrentY = 1675 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "油分"
        PicTemp.CurrentX = 2515 + p1
        PicTemp.CurrentY = 1675 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = CStr(Combo3.Text)
        PicTemp.CurrentX = 1035 + p1
        PicTemp.CurrentY = 1675 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = Text5.Text
        PicTemp.CurrentX = 3750 + p1
        PicTemp.CurrentY = 1675 + p2
        PicTemp.Print aa
        '==
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "班组"
        PicTemp.CurrentX = 105 + p1
        PicTemp.CurrentY = 2005 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = "重量(kg)"
        PicTemp.CurrentX = 2515 + p1
        PicTemp.CurrentY = 2005 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = Text6.Text
        PicTemp.CurrentX = 1035 + p1
        PicTemp.CurrentY = 2005 + p2
        PicTemp.Print aa
        
        PicTemp.FontBold = False
        PicTemp.FontSize = 11
        aa = Text7.Text
        PicTemp.CurrentX = 3750 + p1
        PicTemp.CurrentY = 2005 + p2
        PicTemp.Print aa
        '==============
        PicTemp.Line (45 + p1, 1305 + p2)-(5205 + p1, 2625 + p2), QBColor(1), B
        
        PicTemp.Line (45 + p1, 1305 + p2)-(770 + p1, 1635 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(2455 + p1, 1635 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(3525 + p1, 1635 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(5205 + p1, 1635 + p2), QBColor(1), B
        
        PicTemp.Line (45 + p1, 1305 + p2)-(770 + p1, 1965 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(2455 + p1, 1965 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(3525 + p1, 1965 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(5205 + p1, 1965 + p2), QBColor(1), B
        
        PicTemp.Line (45 + p1, 1305 + p2)-(770 + p1, 2295 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(2455 + p1, 2295 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(3525 + p1, 2295 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(5205 + p1, 2295 + p2), QBColor(1), B
        
        PicTemp.Line (45 + p1, 1305 + p2)-(770 + p1, 2625 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(2455 + p1, 2625 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(3525 + p1, 2625 + p2), QBColor(1), B
        PicTemp.Line (45 + p1, 1305 + p2)-(5205 + p1, 2625 + p2), QBColor(1), B



发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

Hmily 发表于 2022-1-13 12:56
抱歉,未能达到申请要求,申请不通过,可以关注论坛官方微信(吾爱破解论坛),等待开放注册通知。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-14 14:36

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表