Results 1 to 8 of 8

Thread: Launching IE as an Object [RESOLVED]

Threaded View

  1. #8

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Re: Launching IE as an Object

    In case anyone else is interested in this problem the only way to resolve it is to call the .EXE directly to create multiple IE processes. Any of the simpler object based ways only create multiple threads and one process.

    Below is some code I made for this that finds the location of IExplore.exe through the registry and then launches a website. The registry module is attached.

    VB Code:
    1. Option Explicit
    2. Const HKEY_CLASSES_ROOT = &H80000000
    3. Const HKEY_CURRENT_USER = &H80000001
    4. Const HKEY_LOCAL_MACHINE = &H80000002
    5. Const HKEY_USERS = &H80000003
    6.  
    7.     ' Reg Key Security Options...
    8. Const READ_CONTROL = &H20000
    9. Const KEY_QUERY_VALUE = &H1
    10. Const KEY_SET_VALUE = &H2
    11. Const KEY_CREATE_SUB_KEY = &H4
    12. Const KEY_ENUMERATE_SUB_KEYS = &H8
    13. Const KEY_NOTIFY = &H10
    14. Const KEY_CREATE_LINK = &H20
    15. Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _
    16.                        KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _
    17.                        KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL
    18.  
    19. Private Sub Form_Load()
    20.  
    21. Dim strSubKey As String
    22. Dim strValueName As String
    23. Dim AppPath As String
    24. Dim AppPathLen As Integer
    25.  
    26. 'Registry value locations
    27. strSubKey = "SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command"
    28. strValueName = ""
    29.  
    30. 'Returning the application path back from registry
    31. AppPath = RegGetValue$(HKEY_LOCAL_MACHINE, strSubKey, strValueName)
    32.  
    33.  
    34. 'Determining the length of the path
    35. AppPathLen = Len(AppPath)
    36. 'Removing the " %1" from the end of the path
    37. AppPath = Left(AppPath, AppPathLen - 3)
    38. 'Adding the site to be navigated to
    39. AppPath = AppPath & " website"
    40.  
    41. 'Launching IE
    42. Shell AppPath, vbNormalFocus
    43.  
    44. End
    45. End Sub
    Attached Files Attached Files

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