Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Simple way of getting Firefox current URL

What you need to download: NDde.dll
Next is to Add it as your project reference
Project -> Add Reference -> Browse the dll


TOP MOST
Code
Imports NDde.Client

CALL
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 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.

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
fuck your lame ass adfly bullshit.

direct link to the dll
http://ndde.codeplex.com/
So thats what I get from sharing the code? Rather than telling people to PM for the source etc. Lame.
all
http://social.msdn.microsoft.com/Forums/...06c81061b7
(Feb 11, 2013 11:00 AM)Networkmancer Wrote:  So thats what I get from sharing the code? Rather than telling people to PM for the source etc. Lame.
Trying to make money from something you didn't make, you deserve the flames.
What the heck is your problem people, if he choose to put an adfly link then this is entirely up to him, i personally didn't know about the dll thanks to him. Stop making me sick "please"
(Feb 11, 2013 01:33 PM)Spadassin150 Wrote:  What the heck is your problem people, if he choose to put an adfly link then this is entirely up to him, i personally didn't know about the dll thanks to him. Stop making me sick "please"
So you are basically saying that it's ok for him to advertise and make money off of something he doesn't own and never created? I don't think so.
Nice tutorial, but AdFly is yust 😖
[Image: bmb5MjV.png]

Quote:"This library is only intended to be used when no other alternatives exist."

Hmmm... I don't think I will really be using this..
(Feb 11, 2013 01:44 PM)XvI Beta IvX Wrote:  So you are basically saying that it's ok for him to advertise and make money off of something he doesn't own and never created? I don't think so.

Did you ever not realized that many here did not create their own software and source code but was making reputation + links like that through PM method. I did not emphasize to download the .dll through my link. I simply stated what you will need so its up to you to google the .dll or to use my link. 😑

(Feb 11, 2013 12:09 PM)C3ol Wrote:  all
http://social.msdn.microsoft.com/Forums/...06c81061b7
Never been there. This was actually from a C# code.
(Feb 11, 2013 04:59 PM)Networkmancer Wrote:  Did you ever not realized that many here did not create their own software and source code but was making reputation + links like that through PM method. I did not emphasize to download the .dll through my link. I simply stated what you will need so its up to you to google the .dll or to use my link. 😑
Yes and the people who do those kind of links and things when the software is not complicated are skids, I could see an amazing program being PM only but this isn't even PM only, It's adfly and you are trying to make some money off of something you didn't make or own...
Well i dont minde ppl adding adfly they spend time to post codes and stuff so why not support them with a click and 5 sec of your time. better adfly the survery sites , "cant spell it ^^"
(Feb 12, 2013 12:36 PM)AX5 Wrote:  Well i dont minde ppl adding adfly they spend time to post codes and stuff so why not support them with a click and 5 sec of your time. better adfly the survery sites , "cant spell it ^^"

Well because their whiners that want to be cool here, but I removed it for them.
In my opinion it is his own choice to put an Adfly Link in it... He posted it. i dint saw any of you do it -.-

Anyway thanks for sharing :-)
Implement a Finally into your Try Catch method. If it connects and an error is thrown, Disconnect won't be called. This can cause a lot of errors.

Also, use ListBox.Items.Contains() rather than enumerating each one.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by PureLifeCodingOct 21, 2014 08:57 AM 0 231 Oct 21, 2014 08:57 AM
Last Post: PureLifeCoding
[.NET] by Easi--Oct 12, 2014 08:53 AM 3 1,375 Oct 12, 2014 08:53 AM
Last Post: Easi--
[Python] by faw323Jul 8, 2014 02:43 AM 2 114 Jul 8, 2014 02:43 AM
Last Post: Only3