Wilson WindowWare Tech Support

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


Resizing HTML Dialogs

Keywords: 	 resize dialogs

Question:

Apologies if this is been dealt with... I am a everyday user but once in a blue moon programmer!

I am looking forward to using the HTML extender to make better looking dialogs, but all the examples I see open in a virtually full screen browser - which kind of defeats the purpose of a professional looking dialog box.

Is there any way to spawn a new dialog at a specific size (and position even?!!) on the screen, without the usual browser controls etc. I could use a second wbt script to resize it, but this makes for a poor user experience with screens jumping around.

Basically I wish for a dialog that the average user would not suspect is actually IE4.

Thanks in advance...

Answer:

The current version of the HTML DIalog extender has a hSetBrowsePos function to allow you to set size and placement on the screen.

It's a new function. You may need to download a new copy. Here's the information from the help file..

Sets window coordinates for next hBrowse, in virtual 1000x1000 units.

Syntax:

hBrowseSetPos(i:left, i:top, i:right, i:bottom)

Parameters:

(i) left        how far from the left of the screen to place
the upper-left corner (0-1000).
(i) top how far from the top of the screen to place
the upper-left corner (0-1000).
(i) right       how far from the left of the screen to place
the bottom-right corner (0-1000)
(i) bottom      how far from the top of the screen to place
the bottom-right corner (0-1000).

Returns:

(i)     always 1.

You can specify hBrowseSetPos(0, 0, 0, 0) for default coordinates.


Example:

AddExtender("WWHTM34I.DLL")

url = "http://www.windowware.com"

WinTitle("",url)
hBrowseSetPos(250,250,750,750)
url = hBrowse(2,url,0)

while url!=""
   WinTitle("",url)
   url=hBrowse(1,"",0)
endwhile

hBrowse(0,"",1)
exit
Note that the help file example for the last parameter of hBrowse is incorrect.

Set the LAST parameter of hBrowse to 0

1 tells it to start up maximized

Question (cont'd):

Last thing - can I set it up so that the back, forward, stop and refresh buttons do not appear? And the vertical scrollbar appears on the right, although there it no need, as it is dimmed.

And how about changing the icon in the title bar to something other than the Windows one?

Answer:

hBrowser function Instead of setting the third parameter to 0 (formerly 1) set it to 2 (or maybe 6)

Sorry, cannot change icon.


Article ID:   W12530
Filename:   Sizing HTML Dialogs.txt