⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_adduser.frm

📁 提供给入门级别的GPRS编程人员
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Height          =   240
            Left            =   360
            TabIndex        =   38
            Top             =   2250
            Width           =   975
         End
         Begin VB.Label Label13 
            BackStyle       =   0  'Transparent
            Caption         =   "用户密码:"
            Height          =   345
            Left            =   360
            TabIndex        =   37
            Top             =   2760
            Width           =   960
         End
         Begin VB.Label Label14 
            BackStyle       =   0  'Transparent
            Caption         =   "用户SIM号:"
            Height          =   330
            Left            =   360
            TabIndex        =   36
            Top             =   3270
            Width           =   1275
         End
         Begin VB.Label Label15 
            BackStyle       =   0  'Transparent
            Caption         =   "电价:"
            Height          =   300
            Left            =   360
            TabIndex        =   35
            Top             =   3750
            Width           =   870
         End
         Begin VB.Label Label16 
            BackStyle       =   0  'Transparent
            Caption         =   "用户线路:"
            Height          =   300
            Left            =   5700
            TabIndex        =   34
            Tag             =   "STRETCHH"
            Top             =   3750
            Width           =   945
         End
         Begin VB.Label Label17 
            BackStyle       =   0  'Transparent
            Caption         =   "用户台区:"
            Height          =   330
            Left            =   360
            TabIndex        =   33
            Top             =   4245
            Width           =   960
         End
         Begin VB.Label Label18 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表编号:"
            Height          =   330
            Left            =   5700
            TabIndex        =   32
            Tag             =   "STRETCHH"
            Top             =   360
            Width           =   1185
         End
         Begin VB.Label Label19 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表型号:"
            Height          =   210
            Left            =   5700
            TabIndex        =   31
            Tag             =   "STRETCHH"
            Top             =   960
            Width           =   1185
         End
         Begin VB.Label Label20 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表常数:"
            Height          =   165
            Left            =   5700
            TabIndex        =   30
            Tag             =   "STRETCHH"
            Top             =   1455
            Width           =   1185
         End
         Begin VB.Label Label21 
            BackStyle       =   0  'Transparent
            Caption         =   "变压器编号:"
            Height          =   180
            Left            =   5700
            TabIndex        =   29
            Tag             =   "STRETCHH"
            Top             =   2040
            Width           =   1185
         End
         Begin VB.Label Label22 
            BackStyle       =   0  'Transparent
            Caption         =   "变压器型号:"
            Height          =   210
            Left            =   5700
            TabIndex        =   28
            Tag             =   "STRETCHH"
            Top             =   2655
            Width           =   1185
         End
         Begin VB.Label Label23 
            BackStyle       =   0  'Transparent
            Caption         =   "互感器比例:"
            Height          =   330
            Left            =   5700
            TabIndex        =   27
            Tag             =   "STRETCHH"
            Top             =   3150
            Width           =   1185
         End
         Begin VB.Label Label24 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起始读数有功:"
            Height          =   285
            Left            =   360
            TabIndex        =   26
            Top             =   5325
            Width           =   1950
         End
         Begin VB.Label Label25 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起始读数无功:"
            Height          =   285
            Left            =   5700
            TabIndex        =   25
            Tag             =   "STRETCHH"
            Top             =   5325
            Width           =   1815
         End
         Begin VB.Label Label26 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起用日期:"
            Height          =   240
            Left            =   5640
            TabIndex        =   24
            Tag             =   "STRETCHH"
            Top             =   4680
            Width           =   1485
         End
         Begin VB.Label Label1 
            BackStyle       =   0  'Transparent
            Caption         =   "用户地址:"
            Height          =   225
            Left            =   360
            TabIndex        =   23
            Top             =   4680
            Width           =   960
         End
         Begin VB.Label Label2 
            BackStyle       =   0  'Transparent
            Caption         =   "开户日期:"
            Height          =   330
            Left            =   5700
            TabIndex        =   22
            Tag             =   "STRETCHH"
            Top             =   4245
            Width           =   1185
         End
      End
   End
End
Attribute VB_Name = "frm_adduser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
    txt_biaotime.Text = Format(Now, "yyyy-mm-dd hh:mm:ss")
    txt_usertime.Text = Format(Now, "yyyy-mm-dd hh:mm:ss")
    txt_biaosnumy.Text = "0"
    txt_biaosnumn.Text = "0"
End Sub

Private Sub txt_biaoconst_Change()
    Dim i As Integer
    Dim str As String
    If Trim(txt_biaoconst.Text) = "" Then Exit Sub
    For i = 1 To Len(Trim(txt_biaoconst.Text))
        If Asc(Mid(Trim(txt_biaoconst.Text), i, 1)) >= 48 And Asc(Mid(Trim(txt_biaoconst.Text), i, 1)) <= 57 Then
            str = str & Mid(Trim(txt_biaoconst.Text), i, 1)
        End If
    Next i
    txt_biaoconst.Text = str
End Sub

Private Sub txt_biaohao_Change()
    Dim i As Integer
    Dim str As String
    If Trim(txt_biaohao.Text) = "" Then Exit Sub
    For i = 1 To Len(Trim(txt_biaohao.Text))
        If Asc(Mid(Trim(txt_biaohao.Text), i, 1)) >= 48 And Asc(Mid(Trim(txt_biaohao.Text), i, 1)) <= 57 Then
            str = str & Mid(Trim(txt_biaohao.Text), i, 1)
        End If
    Next i
    txt_biaohao.Text = str
End Sub

Private Sub txt_biaosnumn_Change()
    Dim arr() As String
    Dim num As Long
    Dim num1 As Long
    Dim senddata(3) As Byte
    Dim str As String
    Dim tempstr As String
    Dim i As Integer
    If Trim(txt_biaosnumn.Text) = "" Then Exit Sub
    For i = 1 To Len(Trim(txt_biaosnumn.Text))
        If Asc(Mid(Trim(txt_biaosnumn.Text), i, 1)) >= 48 And Asc(Mid(Trim(txt_biaosnumn.Text), i, 1)) <= 57 Then
            str = str & Mid(Trim(txt_biaosnumn.Text), i, 1)
        ElseIf Asc(Mid(Trim(txt_biaosnumn.Text), i, 1)) = 46 Then '小数点可以输入
            str = str & Mid(Trim(txt_biaosnumn.Text), i, 1)
        End If
    Next i
    arr = VBA.Split(Trim(txt_biaosnumn.Text), ".", -1, vbTextCompare)
    If UBound(arr) = 0 Then
        num = Trim(txt_biaosnumn.Text)
        num1 = 0
    ElseIf UBound(arr) = 1 Then
        If arr(0) = "" Then
            MsgBox "请在小数点前加0!"
            txt_biaosnumn.Text = ""
            Exit Sub
        End If
        num = arr(0)
        If arr(1) = "" Then
            num1 = 0
        Else
            num1 = arr(1)
        End If
    Else
        MsgBox "输入的数值不能含两个或两个以上的小数点"
        txt_biaosnumn.Text = ""
        Exit Sub
    End If
    If num >= 0 And num <= 99 Then
       senddata(0) = 0
       senddata(1) = 0
       senddata(2) = num
    ElseIf num >= 100 And num <= 9999 Then
       senddata(0) = 0
       tempstr = num
       str = Mid(tempstr, 1, 2)
       senddata(1) = str
       str = Mid(tempstr, 3)
       senddata(2) = str
    ElseIf num >= 10000 And num <= 999999 Then
       tempstr = num
       senddata(0) = Mid(tempstr, 1, 2)
       senddata(1) = Mid(tempstr, 3, 2)
       senddata(2) = Mid(tempstr, 5)
    Else
        MsgBox "只能输入0-999999.99间的数据,请更正您的输入"
        txt_biaosnumn.Text = ""
        Exit Sub
    End If
    If num1 < 0 Or num1 >= 100 Then
        MsgBox "最多输入2位小数请更正您的输入"
        txt_biaosnumn.Text = ""
        Exit Sub
    End If
    senddata(3) = num1
End Sub

Private Sub txt_biaosnumy_Change() '表记起始读数有功
    Dim arr() As String
    Dim num As Long
    Dim num1 As Long
    Dim senddata(3) As Byte
    Dim str As String
    Dim tempstr As String
    Dim i As Integer
    If Trim(txt_biaosnumy.Text) = "" Then Exit Sub
    For i = 1 To Len(Trim(txt_biaosnumy.Text))
        If Asc(Mid(Trim(txt_biaosnumy.Text), i, 1)) >= 48 And Asc(Mid(Trim(txt_biaosnumy.Text), i, 1)) <= 57 Then
            str = str & Mid(Trim(txt_biaosnumy.Text), i, 1)
        ElseIf Asc(Mid(Trim(txt_biaosnumy.Text), i, 1)) = 46 Then '小数点可以输入
            str = str & Mid(Trim(txt_biaosnumy.Text), i, 1)
        End If
    Next i
    arr = VBA.Split(Trim(txt_biaosnumy.Text), ".", -1, vbTextCompare)
    If UBound(arr) = 0 Then
        num = Trim(txt_biaosnumy.Text)
        num1 = 0
    ElseIf UBound(arr) = 1 Then
        If arr(0) = "" Then
            MsgBox "请在小数点前加0!"
            txt_biaosnumy.Text = ""
            Exit Sub
        End If
        num = arr(0)
        If arr(1) = "" Then
            num1 = 0
        Else
            num1 = arr(1)
        End If
    Else

⌨️ 快捷键说明

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