fuzz
New member
I'm currently working on a small project which will grab the text from the URL boxes in the browser window. I'm creating my own as an experiment and to also watch what other people are using my computer for. As of right now, I can only get the URL from IE, not Firefox or Opera. There may be an issue with the way those two browsers display the text since it's tabbed.
If anyone can help out with those two browsers it would be greatly appreciated it.
VB.NET 2005 Code for getting the IE URL text:
Also, if someone knows of an easier way of doing this task, please post. I'm new to VB.NET 2005 but I've been using VB since version 3.0. I haven't learned all of the new things in 2005 yet but I'm getting there.
If anyone can help out with those two browsers it would be greatly appreciated it.
VB.NET 2005 Code for getting the IE URL text:
VB.NET:
Dim workerw, ieframe, rebarwindow As Integer
Dim combobox, comboboxex, editx As Integer
ieframe = FindWindow("ieframe", vbNullString)
workerw = FindWindowEx(ieframe, 0, "workerw", vbNullString)
rebarwindow = FindWindowEx(workerw, 0, "rebarwindow32", vbNullString)
comboboxex = FindWindowEx(rebarwindow, 0, "comboboxex32", vbNullString)
combobox = FindWindowEx(comboboxex, 0, "combobox", vbNullString)
editx = FindWindowEx(combobox, 0, "edit", vbNullString)
Dim TheText As String
Dim TL As Integer
TL = SendMessageLong(editx, WM_GETTEXTLENGTH, 0, 0)
TheText = New String(" ", TL + 1)
Call SendMessageByString(editx, WM_GETTEXT, TL + 1, TheText)
TheText = VB.Left(TheText, TL)
Also, if someone knows of an easier way of doing this task, please post. I'm new to VB.NET 2005 but I've been using VB since version 3.0. I haven't learned all of the new things in 2005 yet but I'm getting there.