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

📄 rf_tank.frm

📁 我自己写的一个已知RF的L.C计算谐振频率的计算
💻 FRM
字号:
VERSION 5.00
Begin VB.Form RF_TANK 
   Caption         =   "RF_TANK"
   ClientHeight    =   6360
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   5556
   LinkTopic       =   "Form1"
   ScaleHeight     =   6360
   ScaleWidth      =   5556
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmd_exit 
      Caption         =   "Exit"
      Height          =   372
      Left            =   2280
      TabIndex        =   15
      Top             =   5760
      Width           =   972
   End
   Begin VB.Frame Frame2 
      Caption         =   "RF TANK ---  TOTAL CAPACITOR CALCULATOR"
      ForeColor       =   &H00C00000&
      Height          =   2772
      Left            =   240
      TabIndex        =   11
      Top             =   2760
      Width           =   5052
      Begin VB.OptionButton cal_ctotal 
         Caption         =   "cal_Ctotal"
         Height          =   252
         Left            =   3360
         TabIndex        =   25
         Top             =   1800
         Width           =   972
      End
      Begin VB.OptionButton cal_cd4d5 
         Caption         =   "cal_D4  D5"
         Height          =   252
         Left            =   3360
         TabIndex        =   24
         Top             =   1320
         Width           =   1092
      End
      Begin VB.OptionButton cal_c1516 
         Caption         =   "cal_C15 C16"
         Height          =   252
         Left            =   3360
         TabIndex        =   23
         Top             =   840
         Width           =   1212
      End
      Begin VB.OptionButton cal_c42 
         Caption         =   "cal_C42"
         Height          =   252
         Left            =   3360
         TabIndex        =   22
         Top             =   360
         Width           =   852
      End
      Begin VB.CommandButton cmd_calculate2 
         Caption         =   "Calculate"
         Height          =   372
         Left            =   1920
         TabIndex        =   17
         Top             =   2280
         Width           =   1212
      End
      Begin VB.TextBox txt_ctotal 
         Height          =   288
         Left            =   1920
         TabIndex        =   16
         Top             =   1800
         Width           =   1212
      End
      Begin VB.TextBox txt_cd4d5 
         Height          =   288
         Left            =   1920
         TabIndex        =   14
         Top             =   1320
         Width           =   1212
      End
      Begin VB.TextBox txt_c1516 
         Height          =   288
         Left            =   1920
         TabIndex        =   13
         Top             =   840
         Width           =   1212
      End
      Begin VB.TextBox txt_c42 
         Height          =   288
         Left            =   1920
         TabIndex        =   12
         Top             =   360
         Width           =   1212
      End
      Begin VB.Label lbl_ctotal 
         Caption         =   "Ctotal"
         Height          =   252
         Left            =   1200
         TabIndex        =   21
         Top             =   1800
         Width           =   492
      End
      Begin VB.Label lbl_cd4d5 
         Caption         =   "Cd4 = Cd5"
         Height          =   252
         Left            =   1080
         TabIndex        =   20
         Top             =   1320
         Width           =   732
      End
      Begin VB.Label lbl_c1516 
         Caption         =   "C15 = C16"
         Height          =   252
         Left            =   1080
         TabIndex        =   19
         Top             =   840
         Width           =   732
      End
      Begin VB.Label lbl_c42 
         Caption         =   "C42 "
         Height          =   252
         Left            =   1320
         TabIndex        =   18
         Top             =   360
         Width           =   372
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "RF TANK --- L , C , F  CALCULATE"
      ForeColor       =   &H00C00000&
      Height          =   2292
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   5052
      Begin VB.TextBox txt_frequency 
         Height          =   288
         Left            =   1920
         TabIndex        =   7
         Top             =   360
         Width           =   1212
      End
      Begin VB.TextBox txt_inductance 
         Height          =   288
         Left            =   1920
         TabIndex        =   6
         Top             =   840
         Width           =   1212
      End
      Begin VB.TextBox txt_capacitor 
         Height          =   288
         Left            =   1920
         TabIndex        =   5
         Top             =   1320
         Width           =   1212
      End
      Begin VB.CommandButton cmd_calculate1 
         Caption         =   "Calculate "
         Height          =   372
         Left            =   1920
         TabIndex        =   4
         Top             =   1800
         Width           =   1212
      End
      Begin VB.OptionButton cal_frequency 
         Caption         =   "cal_frequency"
         Height          =   252
         Left            =   3360
         TabIndex        =   3
         Top             =   360
         Width           =   1332
      End
      Begin VB.OptionButton cal_inductance 
         Caption         =   "cal_inductance"
         Height          =   252
         Left            =   3360
         TabIndex        =   2
         Top             =   840
         Width           =   1332
      End
      Begin VB.OptionButton cal_capacitor 
         Caption         =   "cal_capacitor"
         Height          =   252
         Left            =   3360
         TabIndex        =   1
         Top             =   1320
         Width           =   1212
      End
      Begin VB.Label lbl_frequcncy 
         Caption         =   "Frequency     (MHZ)"
         Height          =   252
         Left            =   360
         TabIndex        =   10
         Top             =   360
         Width           =   1572
      End
      Begin VB.Label lbl_inductance 
         Caption         =   "Inductance  (nH)"
         Height          =   252
         Left            =   360
         TabIndex        =   9
         Top             =   840
         Width           =   1332
      End
      Begin VB.Label lbl_capacitor 
         Caption         =   "Capacitor  (pF)"
         Height          =   252
         Left            =   360
         TabIndex        =   8
         Top             =   1320
         Width           =   1212
      End
   End
End
Attribute VB_Name = "RF_TANK"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False






Private Sub cmd_calculate1_Click()
Dim cal_value1 As Single
Dim fre As Single
Dim indu As Single
Dim cap As Single
If cal_capacitor.Value = True Then
cal_value1 = (10 ^ 9) / (4 * 3.1416 * 3.1416 * txt_frequency.Text * txt_frequency.Text * txt_inductance.Text)
txt_capacitor.Text = cal_value1
End If
If cal_inductance.Value = True Then
cal_value1 = (10 ^ 9) / (4 * 3.1416 * 3.1416 * txt_frequency.Text * txt_frequency.Text * txt_capacitor.Text)
txt_inductance.Text = cal_value1
End If
If cal_frequency.Value = True Then
cal_value1 = (10 ^ 5) / (2 * 3.1416 * (txt_inductance.Text * 10 * txt_capacitor.Text) ^ 0.5)
txt_frequency.Text = cal_value1
End If
End Sub

Private Sub cmd_calculate2_Click()
Dim cal_value2 As Single
If cal_ctotal.Value = True Then
cal_value2 = txt_c42.Text + 1 / (2 / txt_c1516.Text + 2 / txt_cd4d5.Text)
txt_ctotal.Text = cal_value2
End If
If cal_c42.Value = True Then
cal_value2 = txt_ctotal.Text - 1 / (2 / txt_c1516.Text + 2 / txt_cd4d5.Text)
txt_c42.Text = cal_value2
End If
If cal_c1516.Value = True Then
cal_value2 = 2 * txt_cd4d5.Text * (txt_ctotal.Text - txt_c42.Text) / (txt_cd4d5.Text - 2 * (txt_ctotal.Text - txt_c42.Text))
txt_c1516.Text = cal_value2
End If
If cal_cd4d5.Value = True Then
cal_value2 = 2 * txt_c1516.Text * (txt_ctotal.Text - txt_c42.Text) / (txt_c1516.Text - 2 * (txt_ctotal.Text - txt_c42.Text))
txt_cd4d5.Text = cal_value2
End If
End Sub

Private Sub cmd_exit_Click()

End
End Sub

Private Sub Label2_Click()

End Sub

Private Sub Label3_Click()

End Sub

Private Sub Option1_Click()

End Sub

Private Sub Command1_Click()

End Sub

⌨️ 快捷键说明

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