Results 1 to 3 of 3

Thread: Waiting while instance of IE is open

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    6
    I use following code to open .HTML file with IE. I have to wait in loop while ie window or peocess behind it finishes.
    The usuall microsoft example for waiting for shell program to finish, here doesn't work. I need to get some information, at least if Ie window is open, but Iswindow API doesn't work.

    Public Declare Function ShellExecute Lib "shell32.dll" Alias _
    "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
    ByVal lpFile As String, ByVal lpParameters As String, ByVal _
    lpDirectory As String, ByVal nShowCmd As Long) As Long

    sub main

    res = ShellExecute(0&, vbNullString, "c:\windows\desktop\proba.htm", vbNullString, vbNullString, vbNormalNoFocus)
    If res <= 32 Then
    MsgBox ("Unable to send information to internet!" & Chr(10) & "Next try will be when you login."), vbOKOnly
    Exit Sub
    End If

    end sub

    Please help, Thanks

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60

    Post

    If it is any help, the shell command built into vb returns the task id, i dont know if this will be much good to you thoug, i suppose you could enumerate the tasks that are running on the system and check to see if the task you ran is there, but i am afraid i do not know how to enumerate the tasks on a system.

    Sorry, just a stepping stone in a long path.


    Grant French
    -----------------------------------------------
    E-Mail: [email protected]
    ICQ: 33122184

  3. #3
    Guest
    Use a DoEvents which will wait until the program is loaded and complete the rest of the code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width