📄 frmgg.frm
字号:
VERSION 5.00
Begin VB.Form FrmGg
Caption = "农田灌溉水综合评价"
ClientHeight = 7440
ClientLeft = 60
ClientTop = 345
ClientWidth = 10530
LinkTopic = "Form4"
ScaleHeight = 7440
ScaleWidth = 10530
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command4
Height = 495
Left = 1440
Picture = "FrmGg.frx":0000
Style = 1 'Graphical
TabIndex = 22
Top = 6120
Width = 1455
End
Begin VB.PictureBox Pic1
Height = 375
Left = 8640
ScaleHeight = 315
ScaleWidth = 1155
TabIndex = 21
Top = 6960
Width = 1215
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Left = 6360
MaxLength = 50
TabIndex = 20
Top = 5280
Width = 2415
End
Begin VB.CommandButton Command2
BackColor = &H00C0FFC0&
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6600
Picture = "FrmGg.frx":10D0
Style = 1 'Graphical
TabIndex = 18
Top = 6120
Width = 1455
End
Begin VB.CommandButton Command1
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4020
Picture = "FrmGg.frx":218D
Style = 1 'Graphical
TabIndex = 17
Top = 6120
Width = 1455
End
Begin VB.Frame Frame2
BackColor = &H00FCB370&
Caption = "等级标准"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = -1 'True
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 1935
Left = 1080
TabIndex = 6
Top = 2520
Width = 7815
Begin VB.TextBox Text5
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 6600
MaxLength = 50
TabIndex = 16
Top = 960
Width = 975
End
Begin VB.TextBox Text4
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 5040
MaxLength = 50
TabIndex = 15
Top = 960
Width = 975
End
Begin VB.TextBox Text3
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 3480
MaxLength = 50
TabIndex = 14
Top = 960
Width = 975
End
Begin VB.TextBox Text2
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1920
MaxLength = 50
TabIndex = 13
Top = 960
Width = 975
End
Begin VB.TextBox Text1
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 360
MaxLength = 50
TabIndex = 12
Top = 960
Width = 975
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "V级"
Height = 255
Left = 6600
TabIndex = 11
Top = 480
Width = 855
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "IV级"
Height = 255
Left = 5040
TabIndex = 10
Top = 480
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "III级"
Height = 375
Left = 3480
TabIndex = 9
Top = 480
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "II级"
Height = 375
Left = 1920
TabIndex = 8
Top = 480
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "I级"
Height = 255
Left = 360
TabIndex = 7
Top = 480
Width = 975
End
End
Begin VB.Frame Frame1
BackColor = &H00FCB370&
Caption = "评价因子"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = -1 'True
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 1335
Left = 1080
TabIndex = 0
Top = 600
Width = 7815
Begin VB.OptionButton Option5
BackColor = &H00FCB370&
Caption = $"FrmGg.frx":3256
Height = 495
Left = 6480
TabIndex = 5
Top = 720
Width = 1095
End
Begin VB.OptionButton Option4
BackColor = &H00FCB370&
Caption = $"FrmGg.frx":3268
Height = 615
Left = 5040
TabIndex = 4
Top = 600
Width = 1095
End
Begin VB.OptionButton Option3
BackColor = &H00FCB370&
Caption = $"FrmGg.frx":327B
Height = 375
Left = 1680
TabIndex = 3
Top = 720
Width = 1095
End
Begin VB.OptionButton Option2
BackColor = &H00FCB370&
Caption = $"FrmGg.frx":328E
Height = 375
Left = 3360
TabIndex = 2
Top = 720
Width = 1095
End
Begin VB.OptionButton Option1
BackColor = &H00FCB370&
Caption = "电导率(ds/m)"
Height = 375
Left = 240
TabIndex = 1
Top = 720
Width = 855
End
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "数据栏"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 960
TabIndex = 19
Top = 5280
Width = 4695
End
End
Attribute VB_Name = "FrmGg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer
Dim j As Integer
Private Sub BackG(f As Form, pic As PictureBox)
For i = 0 To (f.ScaleWidth \ pic.Width)
For j = 0 To (f.ScaleHeight \ pic.Height)
PaintPicture pic.Picture, i * pic.Width, j * pic.Height
Next
Next
End Sub
Private Sub Command4_Click()
Dim a As Single
a = Val(Text6.Text)
If Text1.Text = "7.0" Then
If a >= Text1.Text Then
MsgBox ("河流水质处于I级")
Else
If a >= Text2.Text Then
MsgBox ("河流水质处于I级和II级之间")
Else
If a >= Text3.Text Then
MsgBox ("河流水质处于II级和III级之间")
Else
If a >= Text4.Text Then
MsgBox ("河流水质处于III级和IV级之间")
Else
If a >= Text5.Text Then
MsgBox ("河流水质处于IV级和V级之间")
Else
If a < Text5.Text Then
MsgBox ("河流水质处于V级")
End If
End If
End If
End If
End If
End If
Else
If a <= Text1.Text Then
MsgBox ("河流水质处于I级")
Else
If a <= Text2.Text Then
MsgBox ("河流水质处于I级和II级之间")
Else
If a <= Text3.Text Then
MsgBox ("河流水质处于II级和III级之间")
Else
If a <= Text4.Text Then
MsgBox ("河流水质处于III级和IV级之间")
Else
If a <= Text5.Text Then
MsgBox ("河流水质处于IV级和V级之间")
Else
If a > Text5.Text Then
MsgBox ("河流水质处于V级")
End If
End If
End If
End If
End If
End If
End If
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Pic1.Visible = False
Pic1.BorderStyle = 0
Pic1.AutoSize = True
Pic1.Picture = LoadPicture(App.Path + "\03.gif")
BackG Me, Pic1
Command4.Enabled = False
End Sub
Private Sub Form_resize()
BackG Me, Pic1
End Sub
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Command4.Enabled = False
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Option1_Click()
Text1.Text = "0.25"
Text2.Text = "0.75"
Text3.Text = "1.5"
Text4.Text = "2.5"
Text5.Text = "3.5"
Label6.Caption = "请输入电导率(ds/m)的数据"
End Sub
Private Sub Option2_Click()
Text1.Text = "1.5"
Text2.Text = "4.5"
Text3.Text = "7.5"
Text4.Text = "10.5"
Text5.Text = "13.5"
Label6.Caption = "请输入Na2CO3的数据 "
End Sub
Private Sub Option3_Click()
Text1.Text = "0.25"
Text2.Text = "0.75"
Text3.Text = "1.5"
Text4.Text = "2.5"
Text5.Text = "3.5"
Label6.Caption = "请输入钠吸附比(SAR)的数据"
End Sub
Private Sub Option4_Click()
Text1.Text = "1.5"
Text2.Text = "4.5"
Text3.Text = "8"
Text4.Text = "12.5"
Text5.Text = "17.5"
Label6.Caption = "请输入Cl-(mmol/l)的数据 "
End Sub
Private Sub Option5_Click()
Text1.Text = "1.5"
Text2.Text = "4.5"
Text3.Text = "8.0"
Text4.Text = "12.5"
Text5.Text = "17.5"
Label6.Caption = "请输入硼(mmol/l)的数据 "
End Sub
Private Sub Text6_Change()
If Text6.Text <> "" Then
Command4.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -