Solved

"Twebbrowser" problem when using "navigate"

Posted on 2002-04-15
7
408 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
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error 1.1 400 Bad request idhttp delphi 18 92
Intraweb download file link ? 1 137
control image tags in a string ? 12 134
Dev express lookupcombo 3 30
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 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