IonicWind Software

IWBasic => General Questions => Topic started by: Brian on April 01, 2020, 08:05:03 AM

Title: Attach Browser
Post by: Brian on April 01, 2020, 08:05:03 AM
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
Title: Re: Attach Browser
Post by: Egil on April 01, 2020, 10:39:13 AM
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

Title: Re: Attach Browser
Post by: Brian on April 01, 2020, 11:32:23 AM
Egil,

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

Brian
Title: Re: Attach Browser
Post by: LarryMc on April 01, 2020, 12:52:40 PM
that's why they pay Egil the big bucks LOL!
Title: Re: Attach Browser
Post by: Egil on April 01, 2020, 02:54:40 PM
Hi Larry,

I wish you were right! But I have read the User Guide.  ;)