📄 form9.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Object = "{A964BDA3-3E93-11CF-9A0F-9E6261DACD1C}#2.0#0"; "RESIZE32.OCX"
Begin VB.Form Form9
Caption = "槽线"
ClientHeight = 5880
ClientLeft = 60
ClientTop = 345
ClientWidth = 7515
LinkTopic = "Form9"
MDIChild = -1 'True
ScaleHeight = 5880
ScaleWidth = 7515
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 350
Left = 6080
TabIndex = 13
Top = 5240
Width = 1000
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 350
Left = 4520
TabIndex = 12
Top = 5240
Width = 1000
End
Begin VB.Frame Frame1
Height = 4200
Left = 3800
TabIndex = 1
Top = 650
Width = 3300
Begin VB.TextBox Text6
Height = 315
Left = 990
TabIndex = 15
Text = "?"
Top = 3510
Width = 1920
End
Begin VB.TextBox Text4
Height = 315
Left = 990
TabIndex = 6
Text = "1"
Top = 2310
Width = 1920
End
Begin VB.TextBox Text3
Height = 315
Left = 990
TabIndex = 5
Text = "1"
Top = 1680
Width = 1920
End
Begin VB.TextBox Text2
Height = 315
Left = 990
TabIndex = 4
Text = "1"
Top = 1065
Width = 1920
End
Begin VB.TextBox Text5
Height = 315
Left = 990
TabIndex = 3
Text = "?"
Top = 2910
Width = 1920
End
Begin VB.TextBox Text1
Height = 315
Left = 990
TabIndex = 2
Text = "1"
Top = 450
Width = 1920
End
Begin VB.Label Label10
Caption = "mm"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2970
TabIndex = 21
Top = 3510
Width = 285
End
Begin VB.Label Label9
Caption = "mm"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2970
TabIndex = 20
Top = 1680
Width = 285
End
Begin VB.Label Label8
Caption = "mm"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2970
TabIndex = 19
Top = 1080
Width = 285
End
Begin VB.Label Label7
Caption = "mm"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2970
TabIndex = 18
Top = 420
Width = 285
End
Begin VB.Label Label13
Caption = "Ω"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2910
TabIndex = 17
Top = 2910
Width = 345
End
Begin VB.Label Label6
Caption = "λs="
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 210
TabIndex = 16
Top = 3510
Width = 705
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 = 345
Left = 200
TabIndex = 11
Top = 2295
Width = 705
End
Begin VB.Label Label3
Caption = "λo="
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 150
TabIndex = 10
Top = 1680
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 = 345
Left = 200
TabIndex = 9
Top = 1065
Width = 705
End
Begin VB.Label Label1
Caption = "w ="
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 200
TabIndex = 8
Top = 450
Width = 705
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 = 345
Left = 200
TabIndex = 7
Top = 2910
Width = 705
End
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
AutoSize = -1 'True
Height = 4100
Left = 300
ScaleHeight = 4035
ScaleWidth = 3135
TabIndex = 0
Top = 740
Width = 3200
Begin VB.Image Image1
Height = 4095
Left = 0
Stretch = -1 'True
Top = 0
Width = 3195
End
End
Begin ResizeLibCtl.ReSize ReSize1
Left = 170
Top = 5330
_Version = 131072
_ExtentX = 741
_ExtentY = 741
_StockProps = 0
Enabled = -1 'True
FormMinWidth = 0
FormMinHeight = 0
FormDesignHeight= 5880
FormDesignWidth = 7515
End
Begin ComctlLib.TabStrip TabStrip1
Height = 5000
Left = 100
TabIndex = 14
Top = 100
Width = 7300
_ExtentX = 12859
_ExtentY = 8811
_Version = 327682
BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7}
NumTabs = 1
BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "槽 线"
Object.Tag = ""
ImageVarType = 2
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MouseIcon = "Form9.frx":0000
End
End
Attribute VB_Name = "Form9"
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 w, h, er, lo, ZO, ls As Double
w = Text1.Text
h = Text2.Text
lo = Text3.Text
er = Text4.Text
If w <= 0 Or h <= 0 Or er <= 0 Or (w / h) > 1 Then
MsgBox "输入参数无效!请重新输入!"
Else
If (w / h) <= 0.2 Then
ZO = 72.62 - 15.283 * Log(er) + 50 * ((w / h - 0.02) * (w / h - 0.1) / (w / h)) + Log(100 * w / h) * (19.23 - 3.693 * Log(er)) - _
(0.139 * Log(er) - 0.11 + w * (0.465 * Log(er) + 1.44) / h) * (11.4 - 2.636 * Log(er) - 100 * h / lo) ^ 2
ls = (0.923 - 0.195 * Log(er) + 0.2 * w / h - (0.126 * w / h + 0.02) * Log(100 * h / lo)) * lo
Else
ZO = 113.19 - 23.257 * Log(er) + 1.25 * w * (114.59 - 22.531 * Log(er)) / h + 20 * (w / h - 0.2) * (1 - w / h) - _
(0.15 + 0.1 * Log(er) + w * (-0.79 + 0.889 * Log(er)) / h) * (10.25 - 2.171 * Log(er) + w * (2.1 - 0.617 * Log(er)) / h - 100 * h / lo) ^ 2
ls = 0.987 - 0.21 * Log(er) + w * (0.111 - 0.0022 * er) / h - (0.053 + 0.041 * w / h - 0.0014 * er) * Log(100 * h / lo)
End If
Text5.Text = Format(ZO, "##########.0000000000")
Text6.Text = Format(ls, "##########.0000000000")
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\cx.bmp")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -