这个程序
源代码在线查看: 频数统计f3(窗体模块frmfuzz).frm
VERSION 5.00
Begin VB.Form frmFuzz
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "求隶属度"
ClientHeight = 3075
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3075
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdNew
Caption = "清除"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1680
TabIndex = 6
Top = 2400
Width = 1215
End
Begin VB.CommandButton cmdExit
Caption = "退出"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 3
Top = 2400
Width = 1335
End
Begin VB.CommandButton cmdCalc
Caption = "计算"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 2
Top = 2400
Width = 1215
End
Begin VB.TextBox txtU0
Alignment = 2 'Center
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2400
TabIndex = 0
Top = 600
Width = 1575
End
Begin VB.Label lblFF
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 495
Left = 2400
TabIndex = 5
Top = 1440
Width = 1575
End
Begin VB.Label lblF0
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "隶属度(U0)="
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 495
Left = 120
TabIndex = 4
Top = 1440
Width = 2175
End
Begin VB.Label lblU0
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "U0 ="
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 1200
TabIndex = 1
Top = 600
Width = 1095
End
End
Attribute VB_Name = "frmFuzz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'求隶属度窗体
Option Explicit
Dim sngU0 As Single, sngFF As Single
Dim intI As Integer, intJ As Integer
Private Sub Form_Load()
lblF0.Visible = False '“隶属度 =”标签不可视
lblFF.Visible = False '显示隶属度计算结果的标签不可视
End Sub
'计算
Private Sub cmdCalc_Click()
If txtU0.Text = "" Then
MsgBox "必须提供U0值", , "无U0值错误"
Exit Sub
End If
lblF0.Visible = True '“隶属度 =”标签可视
lblFF.Visible = True '显示隶属度计算结果的标签可视
sngU0 = Val(txtU0.Text) '取得需要计算隶属度的变数值
For intI = 1 To intZon
For intJ = 1 To intCCC
If sngU0 >= S((intI - 1) * intCCC + intJ, 1) And _
sngU0 sngFF = R((intI - 1) * intCCC + intJ, 2)
'在标签中显示隶属度计算结果
lblFF.Caption = Val(sngFF)
Exit Sub
End If
Next intJ
Next intI
MsgBox "无法获得隶属度", , "U0值错误"
End Sub
'清除
Private Sub cmdNew_Click()
lblF0.Visible = False '“隶属度 =”标签不可视
lblFF.Visible = False '显示隶属度计算结果的标签不可视
txtU0.Text = "" '清除提供计算隶属度的变数值的文本框
End Sub
'退出
Private Sub cmdExit_Click()
Unload Me '卸载当前窗体
frmCalc.Visible = True '显示计算窗体
End Sub
|
相关资源 |
|
-
数组排序算法,这个程序的头文件中包含四种排序方法:泡沫排序法(bubble)
-
介绍一下这个程序的功能: 1
-
这个程序是一个Win32程序
-
这个程序是一个个人考勤软件,它从系统时钟获取时间信息,只要上下班时按时在当日考勤栏内点击相应的栏目标题即可逐日记录下个人每天的工作时间,按月统计汇总,按年形成文件.可以随意查看过去的记录,也可把记录按
-
这个程序对于输入的一系列浮点数
-
这个程序不错
-
这个程序不错哟 这个是本人写的 哈哈 见笑了
-
最近在新浪"读书频道"下载了一个小说,有40多个页面,后缀全是shtml的,发现改成html就可以在本地看了,但改起来太麻烦,就写了这个程序,专门用来批量修改某目录下的文件后缀.
|