DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    14

    Angry How can I let the internet explorer start to navigate in the same windwo?

    Hi everyBody:

    I have this question which really drive me cruzy,
    By using VB.Net:

    How can I let the internet explorer navigate in the same window either by using win32 API or by using Microsoft Internet Control refreance to my project ?

    some body toled me to use ShellExcute Function in API but itried it and it did not work and some body give me this code :

    Option Explicit
    Private MyExplorer As InternetExplorer

    Private Sub Command1_Click()
    FirstExplorer.Navigate "www.google.com"
    End Sub

    Public Function FirstExplorer() As InternetExplorer
    ' REFERENCE Microsoft Internet Controls for:
    Dim SW As ShellWindows
    Dim IE As InternetExplorer

    If MyExplorer Is Nothing Then

    Set SW = New ShellWindows
    For Each IE In SW
    If TypeName(IE.Document) = "HTMLDocument" Then
    Set MyExplorer = IE
    Exit For
    End If
    Next

    If MyExplorer Is Nothing Then
    ' If there is no Explorer open, then what?
    Set MyExplorer = New InternetExplorer
    End If
    End If

    Set FirstExplorer = MyExplorer

    End Function

    and alos it did not work with me, and also I used the send function as follwoing:

    Sendmessage(hwnd,WM_SETTEXT,0,"http;//www.yahoo.com/" )

    and I foucs that this message set the address bar of the internet explorer to the url but it did not start to navigate .

    So finally Any hlep will be appreciate to solve this problem

    Regard's

    Husam

  2. #2
    Join Date
    Apr 2005
    Posts
    2

    a simple shell explorer

    on error resume next
    set ieobj = createobject("Wscript.Shell")
    ieobj.run("http://www.yahoo.com"),0,true
    ibobj=nothing

    save with extension .vbs

    in vb.net

    on error resume next
    dim ieObj as object
    ieobj = createObject("Wscript.Shell")
    ieobj.run("http://www.yahoo.com"),0,true
    ieobj = nothing


    goodluck

  3. #3
    Join Date
    Apr 2005
    Posts
    14
    Hi netstandby:

    I just really want to thank you about your replayment which really help me to solve my proble , thanks alot

    regard's

    Husam

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links