July 04, 2024, 03:16:16 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Embedded browser

Started by Marco Lohnen, May 29, 2008, 05:49:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marco Lohnen

Hi all,

I'd like to use the embedded browser control without showing scrollbars.. any ideas? Have to use it for some kind of narrowcasting display software..

Marco

LarryMc

As far as I know that is a totally HTML page issue.

On my genealogy website I do it using FRAMES.

See http://www.faqs.org/docs/htmltut/frames/_FRAME_SCROLLING.html for some info.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Marco Lohnen


Thanks Larry, but this seems to be in the control itself.
I get a scrollbar as soon as I use the control, even if it is an empty HTML page..
In VB6 I was able to get it done by using the 'Theatermode'

Marco

LarryMc

Quote from: Marco Lohnen on May 29, 2008, 06:21:05 AM

I get a scrollbar as soon as I use the control, even if it is an empty HTML page..

Which is the default.  Frames has the command to override the scrollbars.

Attached is a eba file that opens a main window and then a child window with an attached browser.

The default page is loaded (index.htm) which contains the frameset info plus it loads the html file noscroll.htm which shows the text and the browser window has no scrollbars.

There might be an easier way to do it but I know this stripped down frameset works.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

sapero

Marco, use one of<body scroll="no">
<body style="overflow:hidden">

More reading and links at http://forum.echoechoplus.com/showthread.php?threadid=8498


LarryMc

whether my way or sapero's way it is still a function of the content of the html page.

Quote<body scroll="no">
I read that that is only recognized by IE browsers but since the EBasic browser is based upon an IE browser it should be no problem.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

sapero

Yet another possiblity is to set the 'scroll' property at runtime:
$include "exdisp.inc"
$include "mshtml.inc"

WINDOW win
OPENWINDOW win,0,0,800,600,@NOAUTODRAW|@SIZE|@MINBOX|@MAXBOX,0,"BROWSER TEST",&handler


WAITUNTIL win.hwnd=0


SUB handler
SELECT @MESSAGE

CASE @IDCREATE
ATTACHBROWSER *<WINDOW>@HITWINDOW
BROWSECMD *<WINDOW>@HITWINDOW, @GOHOME

CASE @IDCLOSEWINDOW
CloseWindow *<WINDOW>@HITWINDOW

CASE @IDNAVCOMPLETE
RemoveBrowserScrollbars(*<WINDOW>@HITWINDOW)

ENDSELECT
RETURN
ENDSUB



SUB RemoveBrowserScrollbars(WINDOW win)
' attached browser MUST be navigated
'
pointer p
IUnknown         unk
IWebBrowser2     browser
IDispatch        disp
IHTMLDocument2   document
IHTMLElement     bodyelement
IHTMLBodyElement body
BSTR             bstrNo

p = GetProp(win.hwnd, "BROWSER")
if (p)
unk = *<comref>p
' browser->document.body.scroll="false"
unk->QueryInterface(_IID_IWebBrowser2, &browser)

browser->get_Document(&disp)
browser->Release()

disp->QueryInterface(_IID_IHTMLDocument2, &document)
disp->Release()

document->get_body(&bodyelement)
document->Release()

bodyelement->QueryInterface(_IID_IHTMLBodyElement, &body)
bodyelement->Release()

bstrNo = SysAllocString(L"no")
body->put_scroll(bstrNo)
body->Release()
SysFreeString(bstrNo)
endif

RETURN
ENDSUB

LarryMc

Sapero,

I was just about to tell him that.........NOT!!!! ;)

It amazes me with how you come up with all that stuff. :o

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Marco Lohnen

Fantastic Guys!

Thanks both for your help..

Marco