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

📄 rlcseries.frm

📁 一款开源基于电子电路理论支持编写的电子电路模拟和分析小软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Default         =   -1  'True
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   4560
         TabIndex        =   24
         Top             =   1560
         Width           =   1455
      End
      Begin VB.CommandButton clear 
         Caption         =   "清除"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   6480
         TabIndex        =   22
         Top             =   1560
         Width           =   1575
      End
      Begin VB.TextBox TextF40 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   360
         Left            =   2160
         TabIndex        =   15
         Top             =   1560
         Width           =   1815
      End
      Begin VB.TextBox TextC40 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   6240
         TabIndex        =   14
         Top             =   960
         Width           =   1815
      End
      Begin VB.TextBox TextV40 
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   360
         Left            =   2160
         TabIndex        =   13
         Top             =   360
         Width           =   1815
      End
      Begin VB.Label Label1 
         Caption         =   "频率:"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   4
         Left            =   240
         TabIndex        =   5
         Top             =   1560
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "电容:"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   3
         Left            =   4320
         TabIndex        =   4
         Top             =   960
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "电感:"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   2
         Left            =   240
         TabIndex        =   3
         Top             =   960
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "电阻:"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   4320
         TabIndex        =   2
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "电压:"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1695
      End
   End
   Begin VB.Line Line2 
      BorderWidth     =   4
      X1              =   0
      X2              =   10080
      Y1              =   8640
      Y2              =   8640
   End
   Begin VB.Line Line1 
      BorderWidth     =   4
      X1              =   0
      X2              =   10080
      Y1              =   600
      Y2              =   600
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "交流电路 -  R, L, C 串联"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1320
      TabIndex        =   23
      Top             =   120
      Width           =   6375
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00FF8080&
      BackStyle       =   1  'Opaque
      Height          =   615
      Left            =   0
      Top             =   0
      Width           =   9135
   End
End
Attribute VB_Name = "RLCSeries"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
Dim V40 As Single
Dim R40 As Single
Dim L40 As Single
Dim C40 As Single
Dim F40 As Single
Dim XL40 As Single
Dim RF40 As Single
Dim XC40 As Single
Dim I40 As Single
Dim Z40 As Single
Dim VR As Single
Dim VC As Single
Dim VL As Single
Const vbkeyDecPt = 46
Const pi = 22 / 7

Private Sub calculate_Click()
V40 = Val(TextV40.Text)
R40 = Val(TextR40.Text)
L40 = Val(TextL40.Text)
C40 = Val(TextC40.Text)
F40 = Val(TextF40.Text)
If L40 = 0 Then
XL40 = 0
Else
XL40 = (2 * pi * F40 * L40)
End If
If C40 = 0 Then
XC40 = 0
Else
XC40 = 1 / (2 * pi * F40 * C40)
End If
If L40 = 0 Or C40 = 0 Then
LblRF40.Caption = " "
Else
RF40 = 1 / (2 * pi * (L40 * C40) ^ (1 / 2))
End If
Z40 = (R40 ^ 2 + (XL40 - XC40) ^ 2) ^ (1 / 2)
I40 = V40 / Z40
VR = I40 * R40
VC = I40 * XC40
VL = I40 * XL40

LblZ40.Caption = Format$(Z40, "###.00ohms")
LblI40.Caption = Format$(I40, "###.000000A")
LblRF40.Caption = Format$(RF40, "###.00HZ")
LblVR.Caption = Format$(VR, "###.00V")
LblVC.Caption = Format$(VC, "###.00V")
LblVL.Caption = Format$(VL, "###.00V")
End Sub

Private Sub clear_Click()
TextV40.Text = " "
TextR40.Text = " "
TextL40.Text = " "
TextC40.Text = " "
TextF40.Text = " "
LblZ40.Caption = " "
LblI40.Caption = " "
LblRF40.Caption = " "
LblVR.Caption = " "
LblVC.Caption = " "
LblVL.Caption = " "
End Sub

Private Sub Command1_Click()
Unload Me
Splash.Show
End Sub

Private Sub TextC40_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
KeyAscii = vbKeyBack Or KeyAscii = vbkeyDecPt Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub
Private Sub TextF40_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
KeyAscii = vbKeyBack Or KeyAscii = vbkeyDecPt Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Private Sub TextL40_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
KeyAscii = vbKeyBack Or KeyAscii = vbkeyDecPt Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Private Sub TextR40_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
KeyAscii = vbKeyBack Or KeyAscii = vbkeyDecPt Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

Private Sub TextV40_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
KeyAscii = vbKeyBack Or KeyAscii = vbkeyDecPt Then
Exit Sub
Else
KeyAscii = 0
Beep
End If
End Sub

⌨️ 快捷键说明

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