Article ID: 176399
Article Last Modified on 5/13/2003
Public flag As Boolean
Private Sub Timer1_Timer()
If Not flag Then
flag = True
RetStr = t.Test(100000)
flag = False
End If
Text1.Text = RetStr
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
RetStr = t.Test(100000)
End Sub
Project Name:TestDelayServer
Class Name: cTestClass
Option Explicit
Public Function Test(Optional delay As Long = 1000) as String
Dim index As Long
Dim Y As String
Dim X As String
Y = "a;lskdjf;laksdjf;lkasjd;flkajsmd;lfkjma;sldkfj;laskdj"
For index = 1 To delay
X = Right(Y, CInt(Len(Y) / 2))
X = ""
Next
Test = "I'm here"
End Function
Option Explicit
Dim t As New TestDelayServer.cTestClass
Dim f As Form
Public RetStr As String
Private Sub Command1_Click()
Set f = New Form1
f.Show
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
RetStr = t.Test(100000)
Text1.Text = RetStr
End Sub
Keywords: kberrmsg kbprb KB176399