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

📄 form7.frm

📁 某大学开发的一个用于对微波传输线状态进行模拟的软件
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Width           =   705
         End
         Begin VB.Label Label2 
            Caption         =   "h  ="
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   210
            TabIndex        =   17
            Top             =   1542
            Width           =   825
         End
         Begin VB.Label Label3 
            Caption         =   "t  ="
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   210
            TabIndex        =   16
            Top             =   2148
            Width           =   855
         End
         Begin VB.Label Label4 
            Caption         =   "er ="
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   210
            TabIndex        =   15
            Top             =   2754
            Width           =   675
         End
         Begin VB.Label Label5 
            Caption         =   "Zo ="
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   210
            TabIndex        =   14
            Top             =   3360
            Width           =   765
         End
      End
      Begin VB.PictureBox Picture2 
         Height          =   4100
         Left            =   90
         ScaleHeight     =   4035
         ScaleWidth      =   3135
         TabIndex        =   5
         Top             =   270
         Visible         =   0   'False
         Width           =   3200
         Begin VB.Image Image1 
            Height          =   4200
            Left            =   0
            Stretch         =   -1  'True
            Top             =   0
            Width           =   3200
         End
      End
      Begin VB.PictureBox Picture1 
         Height          =   4100
         Left            =   90
         ScaleHeight     =   4035
         ScaleWidth      =   3135
         TabIndex        =   4
         Top             =   270
         Visible         =   0   'False
         Width           =   3200
         Begin VB.Image Image2 
            Height          =   4100
            Left            =   0
            Stretch         =   -1  'True
            Top             =   0
            Width           =   3200
         End
      End
   End
   Begin ResizeLibCtl.ReSize ReSize1 
      Left            =   180
      Top             =   5340
      _Version        =   131072
      _ExtentX        =   741
      _ExtentY        =   741
      _StockProps     =   0
      Enabled         =   -1  'True
      FormMinWidth    =   0
      FormMinHeight   =   0
      FormDesignHeight=   5880
      FormDesignWidth =   7515
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   350
      Left            =   4830
      TabIndex        =   2
      Top             =   5310
      Width           =   1000
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   350
      Left            =   6210
      TabIndex        =   1
      Top             =   5310
      Width           =   1000
   End
   Begin ComctlLib.TabStrip TabStrip1 
      Height          =   5000
      Left            =   100
      TabIndex        =   0
      Top             =   100
      Width           =   7300
      _ExtentX        =   12859
      _ExtentY        =   8811
      _Version        =   327682
      BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7} 
         NumTabs         =   2
         BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7} 
            Caption         =   "微带线"
            Object.Tag             =   "w"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {0713F341-850A-101B-AFC0-4210102A8DA7} 
            Caption         =   "耦合微带线"
            Object.Tag             =   "o"
            ImageVarType    =   2
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
Dim pi As Double
pi = 4 * Atn(1)

If Frame2.Visible = True Then
Text5.Text = "?"
Dim w, h, t, er, ZO, ef, bz As Double
w = Text1.Text
h = Text2.Text
t = Text3.Text
er = Text4.Text
If w <= 0 Or h <= 0 Or er <= 0 Then
  MsgBox "输入参数无效!请重新输入!"
 Else
bz = w / h
If bz < 1 Then
ef = (er + 1) / 2 + ((er - 1) / 2) * (1 / Sqr(1 + 12 * h / w) + 0.04 * (1 - w / h) ^ 2)
ZO = (60 / Sqr(ef)) * Log(8 * h / w + 0.25 * w / h)
Else
ef = (er + 1) / 2 + ((er - 1) / 2) * (1 / Sqr(1 + 12 * h / w))
ZO = (120 * pi) / ((Sqr(ef)) * (w / h + 1.393 + 0.667 * Log(w / h + 1.444)))
End If
Text5.Text = Format(ZO, "##########.0000000000")
End If
End If

If Frame3.Visible = True Then
Text9.Text = "?"
Dim zo1, er1, t1, wh1, a, b As Double
zo1 = Text6.Text
er1 = Text7.Text
t1 = Text8.Text
If zo1 <= 0 Or er1 <= 0 Then
  MsgBox "输入参数无效!请重新输入!"
 Else
a = (zo1 / 60) * Sqr((er1 + 1) / 2) + ((er1 - 1) / (er1 + 1)) * (0.23 + 0.11 / er1)
If a > 1.52 Then
wh1 = 8 * Exp(a) / (Exp(2 * a) - 2)
Else
b = 60 * pi ^ 2 / (zo1 * Sqr(er1))
wh1 = (2 / pi) * (b - 1 - Log(2 * b - 1) + ((er1 - 1) / (2 * er1)) * (Log(b - 1) + 0.39 - 0.61 / er1))
End If
Text9.Text = Format(wh1, "##########.0000000000")
End If
End If

If Frame4.Visible = True Then
Text15.Text = "?"
Text16.Text = "?"
Text17.Text = "?"
Dim wh, sh, t2, er2, zo2, zse, zso, g, g1, f, f1, ke, ko1, ko2, whse, whso, temp As Double
temp = Text11.Text
If temp <= 0 Then
 MsgBox "输入参数无效!请重新输入!"
 Else
wh = Text10.Text / temp
sh = Text12.Text / temp
er2 = Text14.Text
t2 = Text13.Text
If wh <= 0 Or sh <= 0 Or er2 <= 0 Then
 MsgBox "输入参数无效!请重新输入!"
 Else
g1 = pi * sh / 2
f1 = pi * wh + pi * sh / 2
g = (Exp(g1) + 1 / Exp(g1)) / 2
f = (Exp(f1) + 1 / Exp(f1)) / 2
ke = (2 * f - g + 1) / (g + 1)
ko1 = (2 * f - g - 1) / (g - 1)
ko2 = 1 + 2 * wh / sh
whse = 2 * Log(ke + Sqr(ke ^ 2 - 1)) / pi
If er2 < 6 Then
whso = 2 * Log(ko1 + Sqr(ko1 ^ 2 - 1)) / pi + (4 / (pi * (1 + er2 / 2))) * Log(ko1 + Sqr(ko1 ^ 2 - 1))
Else
whso = 2 * Log(ko2 + Sqr(ko2 ^ 2 - 1)) / pi + Log(ko2 + Sqr(ko2 ^ 2 - 1)) / pi
End If
If whse > 2 Then
zse = (119.9 * pi / (2 * Sqr(er2))) / (whse / 2 + Log(4) / pi + (Log(Exp(1) * pi ^ 2 / 16) * (er2 - 1)) / (2 * pi * er2 ^ 2) + ((er2 + 1) / (2 * pi * er2)) * (Log(pi * Exp(1) / 2) + Log(0.5 * whse + 0.94)))
Else
zse = (119.9 * pi / Sqr(2 * (er2 + 1))) * (Log(8 / whse) + whse ^ 2 / 32 - ((er2 - 1) / (2 * (er2 + 1))) * (Log(pi / 2) + Log(4 / pi) / er2))
End If
If whso > 2 Then
zso = (119.9 * pi / (2 * Sqr(er2))) / (whso / 2 + Log(4) / pi + (Log(Exp(1) * pi ^ 2 / 16) * (er2 - 1)) / (2 * pi * er2 ^ 2) + ((er2 + 1) / (2 * pi * er2)) * (Log(pi * Exp(1) / 2) + Log(0.5 * whso + 0.94)))
Else
zso = (119.9 * pi / Sqr(2 * (er2 + 1))) * (Log(8 / whso) + whso ^ 2 / 32 - ((er2 - 1) / (2 * (er2 + 1))) * (Log(pi / 2) + Log(4 / pi) / er2))
End If
zo2 = Sqr(zse ^ 2 + zso ^ 2)
Text15.Text = Format(zse, "##########.0000000000")
Text16.Text = Format(zso, "##########.0000000000")
Text17.Text = Format(zo2, "##########.0000000000")
End If
End If
End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim i As Integer
    '处理 ctrl+tab 键,移动到下一个选项卡
    If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
        i = TabStrip1.SelectedItem.Index
        If i = TabStrip1.Tabs.Count Then
            '最后一个选项卡,返回到选项卡 1
            Set TabStrip1.SelectedItem = TabStrip1.Tabs(1)
        Else
            ' 选项卡序数加 1
            Set TabStrip1.SelectedItem = TabStrip1.Tabs(i + 1)
        End If
    End If
End Sub

Private Sub Form_Load()
    '窗体居中
     Me.Left = 1200
   Me.Top = 1200
   Me.Width = 8000
   Me.Height = 6000
   Image1.Picture = LoadPicture(App.Path & "\image\wdx.bmp")
    Image2.Picture = LoadPicture(App.Path & "\image\ohwdx.bmp")
End Sub

Private Sub Option1_Click()
Frame2.Visible = True
Frame3.Visible = False
Option3.Value = True
End Sub

Private Sub Option2_Click()
Frame3.Visible = True
Frame2.Visible = False
Option4.Value = True
End Sub

Private Sub Option3_Click()
Frame2.Visible = True
Frame3.Visible = False
Option1.Value = True
End Sub

Private Sub Option4_Click()
Frame3.Visible = True
Frame2.Visible = False
Option2.Value = True
End Sub

 Private Sub TabStrip1_Click()
     Dim i As Integer
     '显示并激活选中的选项卡控件
     '隐藏并禁止所有其它控件
      For i = 1 To TabStrip1.Tabs.Count
        If i = TabStrip1.SelectedItem.Index Then
           Frame2.Visible = False
           Frame3.Visible = False
           Frame4.Visible = True
           Me.Picture1.Visible = True
           Me.Picture2.Visible = False
         Else
            Frame2.Visible = True
            Frame3.Visible = False
            Frame4.Visible = False
            Option1.Value = True
            Me.Picture2.Visible = True
            Me.Picture1.Visible = False
        End If
    Next
End Sub

⌨️ 快捷键说明

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