Results 1 to 4 of 4

Thread: changing the url

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    traverse city
    Posts
    64

    changing the url

    alright i have the code to open internet explorer im using the following

    Code:
    Call Shell("c:\program files\internet explorer\iexplore.exe " & Text2.Text, vbNormalFocus)
    once explorer is open i need it so that when ever the user clicks enter again it will change the url to what text2 has changed to instead of opening a new window. i hope this makes sense. thanks

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Use the ShellExecute API instead... Do a search for it.


    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    traverse city
    Posts
    64
    i have tryed to use this code

    Code:
    ShellExecute "Http://www.google.com"
    but im not to familiar with the ShellExecute. do i just slap the code above into my program or do i have to add some other things. thanks

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Try this and see

    VB Code:
    1. Private 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
    2. Const SW_SHOWNORMAL = 1
    3. Private Sub Form_Load()
    4.     ShellExecute Me.hwnd, "open", "www.vbforums.com", vbNullString, "C:\", SW_SHOWNORMAL
    5. End Sub


    Has someone helped you? Then you can Rate their helpful post.

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