We help IT Professionals succeed at work.

Delphi 2007 problem opening a URL

Paer Toernell
on
299 Views
Last Modified: 2010-04-05
I use the command:
ShellExecute(0, 'OPEN', 'http://www.experts-exchange.com', nil, nil, SW_SHOWNORMAL);

from Delphi, and initially it worked. Now, however i get some CPU error and the CPU monitor shows up when i execute this command. Any tips?
Comment
Watch Question

Lukasz Zielinskisoftware developer
CERTIFIED EXPERT
Top Expert 2008

Commented:
try this:
ShellExecute(GetDesktopWindow, 'open', 'http://www.experts-exchange.com', nil, nil, SW_SHOWNORMAL);
or if you call it from form
ShellExecute(Handle, 'open', 'http://www.experts-exchange.com', nil, nil, SW_SHOWNORMAL);

ziolko.
Oracle dba
CERTIFIED EXPERT
Top Expert 2009
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Ok, when executing the EXE file i get  error:

'' is not a valid integer

Author

Commented:

This is how i pass the command:

ShellExecute(GetDesktopWindow, 'open', PChar(s), nil, nil, SW_SHOWNORMAL);

Author

Commented:
Its an ECONVERT error

Author

Commented:
When i put the command in the "FormCreate" it works, but not later... The instatiation of the form blocks?

Author

Commented:
Geert Thanx

It works when i run just the exe, but why does it create an exception?

Author

Commented:
Ahhh - sorry, my fault. I converted a non existing string to int....

Still - why the exception?
Geert GOracle dba
CERTIFIED EXPERT
Top Expert 2009

Commented:
something to do with a breakpoint in ntdll.dll i believe
you get this for nearly all microsoft applications
they probably don't like other debuggers ...
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.