Results 1 to 3 of 3

Thread: How do I make my program take IE5 to a webSite??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Angry

    Im trying to focus
    on the combobox to type in
    a webaddress and go there..

    The Classnames are..

    ieframe
    rebarwindow32
    combobox
    edit

    I tried to get focused on rebarwindow32
    but it would do it.. what am I doing wrong??

    Is there a easier way??

    The code im using..

    ------

    Dim hwnd As Long
    Dim Bar As Long
    hwnd& = FindWindow("ieframe", vbNullString)
    Bar& = FindWindowEx(hwnd&, 0&, "rebarwindow32", vbNullString)
    If Bar = 0 Then
    MsgBox "Couldnt Find ComboBox."
    End
    Else
    MsgBox "Found IT!."
    End
    End If

    ------

    Help?
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  2. #2
    Guest
    I have two codes...but both dont enter anything into the combo box.

    Here you go:

    (1):

    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

    ' Here's the function code
    'ShellToBrowser(Me,"http://www.site.com",0)
    Function ShellToBrowser%(frm As Form, ByVal url$, ByVal WindowStyle%)

    Dim api%
    api% = ShellExecute(frm.hwnd, "open", url$, "", App.Path, WindowStyle%)

    'Check return value
    If api% < 31 Then
    'error code - see api help for more info
    MsgBox App.Title & " had a problem running your web browser. You should check that your browser is correctly installed. (Error #" & Format$(api%) & ")", 48, "Browser Unavailable"
    ShellToBrowser% = False
    ElseIf api% = 32 Then
    'no file association
    MsgBox App.Title & " could not find a file association for " & url$ & " on your system. You should check that your browser is correctly installed and associated with this type of file.", 48, "Browser Unavailable"
    ShellToBrowser% = False
    Else
    'It worked!
    ShellToBrowser% = True

    End If

    End Function

    Sub OpenDefaultBrowser(frm As Form, url As String, Style As Integer)
    'OpenDefaultBrowser(Me,"http://www.site.com",0)
    opn% = ShellToBrowser(frm, url, Style)

    End Sub

    (2):

    Public Sub WWWaddress(Address As String)
    '// open up the default web browser and send it to a web page address
    On Error Resume Next
    Dim ReturnVal As Long
    ReturnVal& = Shell("Start.exe " & Address$, 1)
    End Sub

    Hope its somewhat of what your looking for.

    [Edited by Matthew Gates on 05-05-2000 at 09:57 PM]

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    or try this

    Code:
    Dim myIE As New InternetExplorer
    myIE.Visible = True
    myIE.Navigate "http://www.hotmail.com"
    You need to add a reference to microsoft Internet COntrols though

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