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:
  1. Private WithEvents objEx As ex.clsMain
  2. Private WithEvents objEx2 As ex.clsMain
  3.  
  4. Private Sub Form_Load()
  5.     Set objEx = New ex.clsMain
  6.     Set objEx2 = New ex.clsMain
  7.    
  8.     objEx.doProcess
  9.     objEx2.doProcess
  10.    
  11.     Set objEx = Nothing
  12.     Set objEx2 = Nothing
  13. End Sub

Active X Exe:

VB Code:
  1. option explicit
  2. Public Sub doProcess()
  3.     Dim objFile As FileSystemObject
  4.     Dim stext As TextStream
  5.     Dim i, j As Long
  6.     i = 0
  7.     j = 0
  8.    
  9.     Set objFile = New Scripting.FileSystemObject
  10.     Set stext = objFile.OpenTextFile("D:\log.txt", ForAppending, True, TristateUseDefault)
  11.     stext.WriteLine "------------------------------"
  12.     stext.WriteLine " this is for testing "
  13.     stext.WriteLine "------------------------------"
  14.     stext.WriteLine "Start Time : " & Time
  15.     While i < 90000000
  16.         While j < 9000000
  17.         j = j + 1
  18.         Wend
  19.         i = i + 1
  20.     Wend
  21.     stext.WriteLine "End Time : " & Time
  22.     stext.Close
  23.     Set stext = Nothing
  24.     Set objFile = Nothing
  25.    End Sub

Regards,
Naveen