Feb 11, 2013 10:51 AM
(This post was last modified: Feb 11, 2013 05:37 PM by Networkmancer.)
What you need to download: NDde.dll
Next is to Add it as your project reference
Project -> Add Reference -> Browse the dll
TOP MOST
CALL
FUNCTION
Want it to get everytime?
Place it in a timer
Its up to you if where you will store it.
Ill show you a listbox example.
Next is to Add it as your project reference
Project -> Add Reference -> Browse the dll
TOP MOST
Code
Imports NDde.ClientCALL
Code
VARIABLE = GetBrowserURL("Firefox")
TextBox1.Text = GetBrowserURL("Firefox")FUNCTION
Code
Private Function GetBrowserURL(browser As String) As String
Try
Dim dde As New DdeClient(browser, "WWW_GetWindowInfo")
dde.Connect()
Dim url As String = dde.Request("URL", Integer.MaxValue)
Dim text As String() = url.Split(New String() {""","""}, StringSplitOptions.RemoveEmptyEntries)
dde.Disconnect()
Return text(0).Substring(1)
Catch
Return Nothing
End Try
End FunctionWant it to get everytime?
Place it in a timer
Its up to you if where you will store it.
Ill show you a listbox example.
Code
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim counter As Integer = 0
For a As Integer = 0 To ListBox1.Items.Count - 1
If ListBox1.Items(a).ToString() = GetBrowserURL("Firefox") Then
Exit For
Else
counter += 1
End If
Next
If counter = ListBox1.Items.Count Then
ListBox1.Items.Add(GetBrowserURL("Firefox"))
End If
End Sub



![[Image: bmb5MjV.png]](https://i.imgur.com/bmb5MjV.png)