March 28, 2024, 11:40:48 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Attach Browser

Started by Brian, April 01, 2020, 08:05:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hello,

I want to use ATTACHBROWSER and load a custom htm file onto the page when calling it. At the moment I have got ATTACHBROWSER(win,"http://main.htm"), but it thinks that "main.htm" is somewhere other than my hard disk

What do I call to achieve this?

Brian

Egil

Hi Brian,

Just call with the full path to the file on your harddisk. When using HTTP:// the program tries to communicate on a network.
Working example below..


Good luck!
Egil


def wb:window

OPENWINDOW wb,0,0,640,480,@SIZE|@NOAUTODRAW|@MINBOX|@MAXBOX,0,"Test Browse",&main

IF ATTACHBROWSER(wb,getstartpath+"main.htm") = -1
    MESSAGEBOX wb, "Couldn't create browser control","Error"
ENDIF

run = 1
WAITUNTIL run=0

CLOSEWINDOW  wb

END
 

SUB main(),INT

 SELECT @MESSAGE
 CASE @IDCLOSEWINDOW
        run = 0
 ENDSELECT

RETURN 0
ENDSUB

Support Amateur Radio  -  Have a ham  for dinner!

Brian

Egil,

That did it - now why didn't I think of that!

Brian

LarryMc

that's why they pay Egil the big bucks LOL!
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

Hi Larry,

I wish you were right! But I have read the User Guide.  ;)
Support Amateur Radio  -  Have a ham  for dinner!