module1.bas

来自「好的ERP就是要源代码」· BAS 代码 · 共 19 行

BAS
19
字号
Attribute VB_Name = "Module1"
Option Explicit
Public color As Integer


Public Sub ShowNum(source As PictureBox, Target As PictureBox, Digit As Integer, color As Integer, position As Integer)
    If position <> 3 Or position < 6 Then
      Target.PaintPicture source.Picture, (position - 1) * 13 + 4, 4, 13, 23, 13 * (Digit), 23 * (color - 1), 13, 23, vbSrcCopy
    '  Target.Refresh
    End If
    '注释:由于在图形数字中排列第一位的是数字0,故此处不再减1
End Sub

Public Sub ShowMaoHao(source As PictureBox, Target As PictureBox, color As Integer)
    Target.PaintPicture source.Picture, (3 - 1) * 13 + 4, 4, 13, 23, 0, 23 * (color - 1), 13, 23, vbSrcCopy
    Target.PaintPicture source.Picture, (6 - 1) * 13 + 4, 4, 13, 23, 0, 23 * (color - 1), 13, 23, vbSrcCopy
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?