【VB开源代码栏目提醒】:网学会员为需要VB开源代码的朋友们搜集整理了FrmBin.frm相关资料,希望对各位网友有所帮助!
VERSION 5.00
Begin VB.Form FrmBin
Caption = "字节文件"
ClientHeight = 3585
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3585
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Put写盘"
Height = 615
Left = 240
TabIndex = 3
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "Get读盘"
Height = 615
Left = 1560
TabIndex = 2
Top = 2760
Width = 975
End
Begin VB.PictureBox Picture1
Height = 2415
Left = 240
ScaleHeight = 2355
ScaleWidth = 3555
TabIndex = 1
Top = 240
Width = 3615
End
Begin VB.CommandButton Command3
Caption = "Delete"
Height = 615
Left = 2880
TabIndex = 0
Top = 2760
Width = 975
End
End
Attribute VB_Name = "FrmBin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Teach As Teacher
Private Sub Command1_Click()
Open App.Path & "\Score.byt" For Binary As #1
LastRecord = FileLen(App.Path & "\score.byt")
Seek #1, LastRecord + 1
Do '从头开始写盘
Teach.name = InputBox("请输入名字xxxxxxxx", "科学家年谱")
Teach.born = InputBox("请输入出生年代xxxx", "科学家年谱")
Teach.remark = InputBox("请输入注解", "科学家年谱")
ss = Seek(1)
Put #1, ss, Teach '把输入内容写盘
x = MsgBox("Continue?", 36, "继续吗?")
If x = 7 Then Exit Do
Loop
Close #1
End Sub
Private Sub Command2_Click()
Picture1.Cls '清除图片框
Open App.Path & "\Score.byt" For Binary As #2
LastRecord = FileLen(App.Path & "\score.byt")
Do While Not EOF(2)
s = Seek(2)
If s > LastRecord Then Exit Do
If s > 0 Then
Get #2, s, Teach '读盘,然后:
Picture1.Print Teach.name; Teach.born '显示在图片框
Picture1.Print Teach.remark '显示在图片框
End If
Loop
Close #2
End Sub
Private Sub Command3_Click()
Kill App.Path & "\score.byt"
End Sub
Private Sub Form_Load()
Caption = "字节文件:科学家E-Mail"
Command1.Caption = "Put写盘"
Command2.Caption = "Get读盘"
Command3.Caption = "Del删除"
End Sub
上一篇:
DisconnectNetDrive.cpp
下一篇:
中德大学生医保