Solved

"Twebbrowser" problem when using "navigate"

Posted on 2002-04-15
7
411 Views
Last Modified: 2010-04-04
Hi

My application uses Twebbrowser to display HTML-files
in an explorerwindow. The application openens a new window for every link. Here is an example:

        flag := navOpenInNewWindow;
        browser.Navigate(link,flag);

This works great... but:

Problem:
When running the application on win2000 or XP the
window is created behind my applicationwindow. In most situations you can´t se that explorer is opened....

Is there any way that I can force the new window on top?

0
Comment
Question by:Martin_Andersen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 7

Expert Comment

by:God_Ares
ID: 6942308
this is a double post...

well basicly, isn't i cauzed because your main window formstyle is set on fsStayOnTop instead on fsNormal?
0
 

Author Comment

by:Martin_Andersen
ID: 6942325
No..
Mainwindow´s formstyle is: fsNormal

In win98 or winNT the window allways popup in front
of my application but not under win2000.
0
 
LVL 7

Expert Comment

by:God_Ares
ID: 6942356
strange i'm using w2000 but no problems
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Expert Comment

by:ginsonic
ID: 6942441
listening
0
 

Accepted Solution

by:
Farderlorn earned 150 total points
ID: 7026881
What about this:

enumerate all ExplorerWindows (class: IEFrame) and put their handles in a stringlist.

then do your code to open the new one

  flag := navOpenInNewWindow;
  browser.Navigate(link,flag);

now enumerate the Windows again and check wich window is NOT in the list. This is your new one. Take the handle and use SetForegroundWindow(handle) to bring it on top of all windows.

...just from the top of my head
 - Farderlorn
0
 

Expert Comment

by:azag
ID: 8548702
Have you tried placing an application.processmessages before opening the browser window?

There is a trick with XP in that if menus are running, modal dialogs can sometimes not be brought to the front.

Rob
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9003268
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer from Farderlorn

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month6 days, 5 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question