Hi All,
Was wondering if anyone could help me with this, I have an activeX Exe that was called from one standard exe. In standard Exe i instantiated that activex exe two times by using new keyword.
In that activex exe i used a loop that will take 7 seconds. while running the standard exe i observed that the two activex exe are not running simultaneously. how can i run the two activex exe simultaneously.
below i am giving the vb code.
standard exe:
VB Code:
Private WithEvents objEx As ex.clsMain Private WithEvents objEx2 As ex.clsMain Private Sub Form_Load() Set objEx = New ex.clsMain Set objEx2 = New ex.clsMain objEx.doProcess objEx2.doProcess Set objEx = Nothing Set objEx2 = Nothing End Sub
Active X Exe:
VB Code:
option explicit Public Sub doProcess() Dim objFile As FileSystemObject Dim stext As TextStream Dim i, j As Long i = 0 j = 0 Set objFile = New Scripting.FileSystemObject Set stext = objFile.OpenTextFile("D:\log.txt", ForAppending, True, TristateUseDefault) stext.WriteLine "------------------------------" stext.WriteLine " this is for testing " stext.WriteLine "------------------------------" stext.WriteLine "Start Time : " & Time While i < 90000000 While j < 9000000 j = j + 1 Wend i = i + 1 Wend stext.WriteLine "End Time : " & Time stext.Close Set stext = Nothing Set objFile = Nothing End Sub
Regards,
Naveen




Reply With Quote