Käynnissä

Get the URL of Internet Explorer 10 in Windows 8

We need a short source code to get the URL of the current visible page in Internet Explorer 10 in Windows 8.

I prefer a Delphi source code, but VB or C is also okay.

IMHO there are two ways to get the URL:

*** 1st solution idea (find the address bar via FindWindowEx):

IntPtr IEwindowHandle = GetForegroundWindow();

IntPtr childHandle = [url removed, login to view];

childHandle = FindWindowEx(IEwindowHandle, [url removed, login to view], "WorkerW", [url removed, login to view]);

if (childHandle != [url removed, login to view])

{

//get the handle to the address bar on IE

childHandle = FindWindowEx(childHandle, [url removed, login to view], "ReBarWindow32", [url removed, login to view]);

if (childHandle != [url removed, login to view])

{

// get a handle to comboBoxEx32

childHandle = FindWindowEx(childHandle, [url removed, login to view], "ComboBoxEx32", [url removed, login to view]);

if (childHandle != [url removed, login to view])

{

// get a handle to combo box

childHandle = FindWindowEx(childHandle, [url removed, login to view], "ComboBox", [url removed, login to view]);

if (childHandle != [url removed, login to view])

{

//get handle to edit

childHandle = FindWindowEx(childHandle, [url removed, login to view], "Edit", [url removed, login to view]);

if (childHandle != [url removed, login to view])

{

// now to get the URL we need to get the Text - but first get the length of the URL

int length = SendMessage(childHandle, WM_GETTEXTLENGTH, 0, null);

length += 1; // because the length returned above included 0

StringBuilder text = new StringBuilder(length); // need stringbuilder - not string

int hr = SendMessage(childHandle, WM_GETTEXT, length, text); // get the URL

string strURL = [url removed, login to view]();

}

}

}

}

}

*** 2nd solution idea (google: DdeConnect WWW_GetWindowInfo)

string url = [url removed, login to view];

try

{

DdeClient oDde = new DdeClient("IExplore", "WWW_GetWindowInfo");

try

{

[url removed, login to view]();

url = [url removed, login to view]("1", [url removed, login to view]);

[url removed, login to view]();

}

catch (Exception ex)

{

throw ex;

}

}

catch (Exception ex)

{

throw ex;

}

Taidot: C-ohjelmointi, C++ -ohjelmointi, Delphi, tietojärjestelmäarkkitehtuuri, Visual Basic

Näytä lisää: url internet explorer, url internet explorer windows, iexplore url, string the, internet catch, get length string, get string, find current address, internet programming, get windows, short url, hr solution, find programming, explorer, delphi edit, combo box code, visual code delphi, google delphi, delphi sendmessage, delphi address bar, url internet, edit sendmessage, delphi string, visual basic internet explorer, internet url

About the Employer:
( 161 reviews ) Berlin, Germany

Projektin tunnus: #4255375

Myönnetty käyttäjälle:

vano101

Hello It looks quite easy, but I'm not sure I've understood correctly - do you have already 2 solution and you want to compile and check it?

31 $ USD 1 päivässä
(475 arvostelua)
6.6

6 freelanceria on tarjonnut keskimäärin 74 $ tähän työhön

qspsolutions

Details in PMB.

50 $ USD 0 päivässä
(28 arvostelua)
6.1
NiceDeveloper

Hi, I have another guaranteed solution. Please check my message. Thanks

200 $ USD 3 päivässä
(19 arvostelua)
5.0
sanja1989

Hi! I have found the solution!

30 $ USD 1 päivässä
(4 arvostelua)
2.5
fominov

Hi! It's not difficult project and price is low. Will be happy to work. Thanks.

30 $ USD 2 päivässä
(2 arvostelua)
2.0
HerrNuki

I can do this job for you. Regards Nuki

100 $ USD 3 päivässä
(0 arvostelua)
0.0