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 I tried 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