469,289 Members | 2,125 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

Obtaining the Current URL From IE and NetScape

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

Dec 26 '05 #1
3 1850
"Husam" <Hu***@discussions.microsoft.com> schrieb:
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 S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 26 '05 #2

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]


"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... "Husam" <Hu***@discussions.microsoft.com> schrieb:
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 S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 27 '05 #3
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
su************@webspiders.com
****please help me If you can

Jan 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Terry Mulvany | last post: by
5 posts views Thread by zion_zii | last post: by
6 posts views Thread by honguin | last post: by
7 posts views Thread by =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.