发表于:2004-05-19 11:23:00
1楼
Dim objmcgs As Object
Private Sub cdmcreat_Click()
Dim msg As String
msg = Text3
objmcgs.createnewdata msg, 2, 0, "miao", 10, 0, 0
End Sub
Private Sub cmdread_Click()
Dim msg As String, tt As Variant
For i = 1 To 5
msg = "data" + Format$(i)
objmcgs.getvaluefromname msg, tt
Text1(i - 1) = Format$(tt)
Next
End Sub
Private Sub cmdwrite_Click()
Dim msg As String, tt As Variant
For i = 1 To 5
msg = "data" + Format$(i + 5)
tt = Val(Text2(i - 1))
objmcgs.setvaluefromname msg, tt
Next
End Sub
Private Sub Command1_Click()
objmcgs.setwindow "窗口1", 1
End Sub
Private Sub Form_Load()
On Error Resume Next
Set objmcgs = GetObject(, "mcgsrun.datacentre")
If Err Then
MsgBox ("请先启动mcgs运行环境")
End
End If
End Sub