Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Keeping an HTML Dialog Window on Top

Keywords: 	  always on top	IntControl(54,...)

Question:

I have just started playing around with HTMLDialogs, trying to convert an older system I had which used the older BoxDrawing routines.

In my old system I had the program stay 'Ontop' using IntControl(54,...), but when I try this with the new HTMLDialog it doesn't seem to work.

I get the correct result back from the IntControl call (TRUE) but the window does NOT stay on top.

Am I doing something wrong - or can you not do this with the HTMLDialogs?

Any help appreciated!

Answer:

The HTML Dialog window is a window owned by a different process, so it is not in the "Stay on Top" category that the IntControl affects.

Presumably a second script launched just before the hBrowse could set it that way too, but it would be a little tricky due to timing and other considerations.

The second script would have to:

  1. TimeDelay for the HtmlDialog window to appear.

  2. Use WinItemNameID to capture the ID of the HTML dialog window and seperate it out from the returned list of windows and ID's. A bit tricky as two windows will have the same name.
Once the proper ID is obtained, then the IntControl(54) using the ID instead of the window name ought to work.

I took a quick look at this and it worked fine for me. You might want to have the html generating program start another program which uses WinIDGet immediately, but I didn't have any difficulties. In fact, I can confirm that I used IntControl 54 on the actual html window, and it stayed in on-top mode even after I submitted and the screen ostensibly went away. I assume the thread didn't, or the window handle was just reused. (Actually, I saw 4 threads when I ran just stones.wbt).

I was able to minimize the html dialog, but switching to other tasks did not make them the active, visible windows.


Article ID:   W12529
Filename:   Keeping an HTML Dialog on Top.txt