OpenURL with code lazarus / 31-LCL ---------------------------------------------------------------------- Elmug · 2011-09-09 01:01 Good people, OpenURL works great. However, when the webbrowser opens the page under the Lazarus application, when I believe the common way is that it would open above the application. Any suggestions? The documentation shows no options. http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/openurl.html Thanks! ---------------------------------------------------------------------- IPguy · 2011-09-09 01:47 Interesting.  My web browsers always open on top of my app and I do nothing special. In all cases, the below is just responding to a user click.  If the openURL was in the middle of a code stream, your program might return it's focus back to your program. Code: [Select]procedure TeraGLEANClick(Sender: TObject); begin   openURL('http://www.mywebsite.com'); end; ---------------------------------------------------------------------- Elmug · 2011-09-09 02:35 Thanks for the reply IP. I will check it on another computer, exactly the same app using a usb stick and report back. ---------------------------------------------------------------------- IPguy · 2011-09-09 02:40 Elmug, how do you call the url? a) In response to a user click b) In the middle of a bunch of code within one of your procedures? BTW - I'm doing this on a win32-Vista system, using FireFox as my default browser and FF is already open, although minimized. ---------------------------------------------------------------------- Elmug · 2011-09-09 18:04 Hi again. I tested in another laptop and the web opens again behind the app. Then I went and found that exactly what IPguy said, "your program might return it's focus back to your program." was the cause. I did have a .Setfocus statement some lines after the "openurl" code. So I fixed that now just by commenting out the ".setfocus". Thanks IPguy for catching it!