Obtaining the Current URL From IE and NetScape

G

Guest

Hi EveryBody:

I am new developer in Vb.Net And I found a code that Obtained the URL of IE
Or Netscape.

Unfortunatlly this Code is Applies to: VB4-32, VB5, VB6

And I want to use it for Vb.NEt When I plug it in my development enviromet I
found Alot of errors. So Can Any one Help me And Adjust this code and make it
applicable for Vb.Net

The form Should be Like the following:

Drop a command button (Command1) two labels (Label1, Label2) onto a form,
setting the autosize property of the labels True. The third label in the
illustration above is the result of preparing the graphic as a composite
image to demonstrate both NS modes. Add the following code to the form:

The Code IS :

Option Explicit

Private Sub Command1_Click()

On Error GoTo command_error

With Label1
.Caption = ""
.AutoSize = True
.LinkTopic = "IExplore|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

DoEvents

With Label2
.Caption = ""
.AutoSize = True
.LinkTopic = "Netscape|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

Exit Sub

command_error:

'try the next step on error
Resume Next

End Sub

Any help will be appreciated

regard's

Husam
 
H

Herfried K. Wagner [MVP]

Husam said:
I am new developer in Vb.Net And I found a code that Obtained the URL of
IE
Or Netscape.

Unfortunatlly this Code is Applies to: VB4-32, VB5, VB6

And I want to use it for Vb.NEt When I plug it in my development enviromet
I
found Alot of errors. So Can Any one Help me And Adjust this code and make
it
applicable for Vb.Net

DDE is not supported by the .NET Framework.

For MSIE:

\\\
' Requires a reference to "Microsoft Internet Controls" ("SHDocVw.dll").
For Each IE As InternetExplorer In New ShellWindows()
MsgBox(IE.LocationURL)
Next IE
///
 
M

m.posseth

Herfried .
DDE is not supported by the .NET Framework.

DDE is obsolete for a while know however you can still use it


i have some nice example code from Mark Hurd that shows how to use DDE in
VB.Net

for those of you interested http://members.ozemail.com.au/~markhurd/

only interesting for maintenance purposes ( creating new systems that need
to comunicate to older systems )

regards

Michel Posseth [MCP]
 
S

suhasis.sarkar

Hi
Your code is indeed very effective for IE, but it is not working
properly in the netscape browser.can u help me with code that will run
on the netscape browser.In my current project it is needed.
regards
suhasis
my email id is
(e-mail address removed)
****please help me If you can
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top