VB中的“Open”怎麽用???给个实例

来源:百度知道 编辑:UC知道 时间:2024/06/07 12:48:15
VB中的“Open”怎麽用???给个实例[编程]

Option Explicit
Dim f As Long
Dim paintnow As Boolean
Private Sub Form_MouseDown(button As Integer, shift As Integer, x As Single, y As Single)
paintnow = True
End Sub
Private Sub form_mouseup(button As Integer, shift As Integer, x As Single, y As Single)
paintnow = False

End Sub
Private Sub form_mousemove(button As Integer, shift As Integer, x As Single, y As Single)
If paintnow Then
PSet (x, y)
End If

End Sub
Private Sub form_load()
DrawWidth = 10
ForeColor = RGB(0, 0, 255)
Label5.Caption = "起点位置:" & " hscroll1.value"
End Sub

Private Sub Command1_Click()
Dim person1 As id
Open "e:\test\score.dat" For Random As #1 Len = Len(person1)

person1.name = "张三"
person1.score = 87
Put #1, 1, person1

person1.name = "李四"
person1.score = 97
Put #1, 2, person1

perso