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

📄 frmupdateacr.frm

📁 利用VB开发的针对Maxim-Dallas DS2770电量检测芯片
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmUpdateACR 
   Caption         =   "Set Accumulated Current Register"
   ClientHeight    =   1950
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4485
   Icon            =   "frmUpdateACR.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   1950
   ScaleWidth      =   4485
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Left            =   1560
      TabIndex        =   5
      Top             =   1560
      Width           =   1335
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "OK"
      Height          =   375
      Left            =   3000
      TabIndex        =   4
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Height          =   1455
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4455
      Begin VB.TextBox txtBatteryCapacity 
         Height          =   285
         Left            =   2160
         TabIndex        =   8
         Text            =   "0"
         Top             =   840
         Width           =   1095
      End
      Begin VB.TextBox txtNewICA 
         Height          =   285
         Left            =   2160
         TabIndex        =   3
         Text            =   "0"
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "mAhrs"
         Height          =   255
         Left            =   3360
         TabIndex        =   7
         Top             =   840
         Width           =   1335
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "Rated Battery Capacity"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   840
         Width           =   1815
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "mAhrs"
         Height          =   255
         Left            =   3360
         TabIndex        =   2
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "New ACR Value"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1695
      End
   End
End
Attribute VB_Name = "frmUpdateACR"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    If Val(txtNewICA.Text) > (32767 * 0.00625 / SenseResistor) Then
        txtNewICA.Text = 32767 * 0.00625 / SenseResistor
    ElseIf Val(txtNewICA.Text) < -(32767 * 0.00625 / SenseResistor) Then
        txtNewICA.Text = 32767 * 0.00625 / SenseResistor
    End If
    
    UpdateACR Val(txtNewICA.Text)
    
    If Val(txtBatteryCapacity.Text) <> 0 Then
        BatteryCapacity = Val(txtBatteryCapacity.Text)
    End If
    Unload Me
End Sub

Private Sub Form_Load()
    txtNewICA.Text = Format(ACR, "#0.00")
    txtBatteryCapacity.Text = Format(BatteryCapacity, "#0.00")
End Sub

⌨️ 快捷键说明

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