📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Peano"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 11505
LinkTopic = "Form1"
ScaleHeight = 4290
ScaleWidth = 11505
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data3
Caption = "Data3"
Connect = "Access"
DatabaseName = "Peano1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 4680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "group"
Top = 3840
Visible = 0 'False
Width = 2055
End
Begin VB.Frame Frame4
Caption = "数据转换"
Height = 3015
Left = 5280
TabIndex = 22
Top = 120
Width = 2535
Begin VB.CommandButton Command7
Caption = "数据插接与熵计算"
Height = 495
Left = 480
TabIndex = 27
Top = 2160
Width = 1815
End
Begin VB.TextBox Text8
Height = 270
Left = 360
TabIndex = 24
Text = "f:\1\.txt"
Top = 1560
Width = 1935
End
Begin VB.TextBox Text7
Height = 270
Left = 360
TabIndex = 23
Text = "f:\1\.txt"
Top = 720
Width = 1935
End
Begin VB.Label Label10
Caption = "保存文件为:"
Height = 375
Left = 240
TabIndex = 26
Top = 1200
Width = 1215
End
Begin VB.Label Label9
Caption = "原始文件:"
Height = 375
Left = 240
TabIndex = 25
Top = 360
Width = 1215
End
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = "Peano1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 7200
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "array"
Top = 3840
Visible = 0 'False
Width = 2055
End
Begin VB.TextBox Text4
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1200
TabIndex = 20
Text = "0"
Top = 3270
Width = 1815
End
Begin VB.CommandButton Command6
Caption = "Command6"
Height = 495
Left = 5400
TabIndex = 19
Top = 3240
Width = 2295
End
Begin VB.Frame Frame3
Caption = "数据转换"
Height = 3015
Left = 2640
TabIndex = 8
Top = 120
Width = 2535
Begin VB.CommandButton Command2
Caption = "数据转换成RGB文件"
Height = 495
Left = 480
TabIndex = 15
Top = 2160
Width = 1815
End
Begin VB.TextBox Text6
Height = 270
Left = 360
TabIndex = 10
Text = "f:\1\.txt"
Top = 720
Width = 1935
End
Begin VB.TextBox Text5
Height = 270
Left = 360
TabIndex = 9
Text = "f:\1\.txt"
Top = 1560
Width = 1935
End
Begin VB.Label Label4
Caption = "原始文件:"
Height = 375
Left = 240
TabIndex = 12
Top = 360
Width = 1215
End
Begin VB.Label Label3
Caption = "保存文件为:"
Height = 375
Left = 240
TabIndex = 11
Top = 1200
Width = 1215
End
End
Begin VB.CommandButton Command4
Caption = "写DB(RGB)"
Height = 375
Left = 10080
TabIndex = 5
Top = 840
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "绘 图"
Height = 495
Left = 8280
TabIndex = 4
Top = 3240
Width = 2535
End
Begin VB.Frame Frame2
Caption = "绘制图形"
Height = 3015
Left = 7920
TabIndex = 3
Top = 120
Width = 3495
Begin VB.CommandButton Command8
Caption = "写DB(熵)"
Height = 375
Left = 2160
TabIndex = 30
Top = 1560
Width = 1215
End
Begin VB.TextBox Text9
Height = 270
Left = 120
TabIndex = 29
Text = "f:\1\.txt"
Top = 1560
Width = 1935
End
Begin VB.TextBox Text3
Height = 270
Left = 120
TabIndex = 16
Text = "f:\1\.txt"
Top = 720
Width = 1935
End
Begin VB.CommandButton Command5
Caption = "清空数据库"
Height = 495
Left = 720
TabIndex = 14
Top = 2160
Width = 2055
End
Begin VB.Label Label7
Caption = "原始文件(熵):"
Height = 375
Left = 240
TabIndex = 28
Top = 1200
Width = 1455
End
Begin VB.Label Label5
Caption = "原始文件(RGB):"
Height = 375
Left = 240
TabIndex = 17
Top = 360
Width = 1575
End
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "Peano1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 9480
Options = 0
ReadOnly = 0 'False
RecordsetType = 0 'Table
RecordSource = "peano"
Top = 3840
Visible = 0 'False
Width = 1695
End
Begin VB.Frame Frame1
Caption = "数据处理"
Height = 3015
Left = 0
TabIndex = 0
Top = 120
Width = 2535
Begin VB.CommandButton Command1
Caption = "数据清理为有效值"
Height = 495
Left = 480
TabIndex = 13
Top = 2160
Width = 1695
End
Begin VB.TextBox Text2
Height = 270
Left = 360
TabIndex = 6
Text = "f:\1\.txt"
Top = 1560
Width = 1935
End
Begin VB.TextBox Text1
Height = 270
Left = 360
TabIndex = 2
Text = "f:\1\.txt"
Top = 720
Width = 1935
End
Begin VB.Label Label2
Caption = "保存文件为:"
Height = 375
Left = 240
TabIndex = 7
Top = 1200
Width = 1815
End
Begin VB.Label Label1
Caption = "原始文件:"
Height = 375
Left = 240
TabIndex = 1
Top = 360
Width = 1455
End
End
Begin VB.Label Label8
Caption = "运算次数:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 21
Top = 3360
Width = 1215
End
Begin VB.Label Label6
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 18
Top = 3840
Width = 11175
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sFILE As String, sCON As String, sTEMP As String, ch As String, sTEMP1 As String
Dim sCON1 As String
Dim lCOUNTS As Long, lI As Long, lCOUNTS1 As Long, lJ As Long
Dim sDSP As String
Dim lcon As Long
If Val(Text4.Text) > 0 Then
lcon = Text4.Text
Else
lcon = 1000000000
End If
sFILE = Text1.Text
If Text1.Text = "" Then
MsgBox "请输入文件名及路径!"
Exit Sub
End If
If Dir(sFILE) = "" Then
MsgBox "文件" + sFILE + "不存在!"
Exit Sub
End If
Command1.BackColor = RGB(125, 125, 125)
'读原始文件'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Open Text1.Text For Input As #1
sCON = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
lCOUNTS = Len(sCON)
sDSP = Str(lCOUNTS \ 10000)
'清除无用字符''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Do While lJ * 10000 < lCOUNTS
If lCOUNTS > (lJ + 1) * 10000 Then
sCON1 = Mid(sCON, lJ * 10000 + 1, 10000)
lCOUNTS1 = 10000
Else
sCON1 = Mid(sCON, lJ * 10000 + 1, lCOUNTS - lJ * 10000)
lCOUNTS1 = lCOUNTS - lJ * 10000
End If
For lI = 1 To lCOUNTS1
ch = Mid(sCON1, lI, 1)
If InStr(1, "a,t,c,g,A,T,C,G,n,N", ch) Then
sTEMP1 = sTEMP1 + ch
End If
Next
sTEMP = sTEMP + sTEMP1
lJ = lJ + 1
sTEMP1 = ""
Label6 = "Step1:" + Format(lJ * 10000, "0,000") + "/" + sDSP + "0000"
Label6.Refresh
If Len(sTEMP) >= lcon Then
sTEMP = Left(sTEMP, lcon)
Exit Do
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -