Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"Twebbrowser" problem when using "navigate"

Posted on 2002-04-15
7
Medium Priority
?
412 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 9

Expert Comment

by:ginsonic
ID: 6942441
listening
0
 

Accepted Solution

by:
Farderlorn earned 600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

722 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