Author Topic: Web Browser  (Read 26708 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Re: Web Browser
« Reply #30 on: July 28, 2013, 10:16:45 AM »
Charles..
what you think that i must do with this subroutines created with EBasic and build dll from them?
How i can call them from oxygen, i have tried in a scintilla way but not work...
any idea?
ebcode in dll...
Code: [Select]
DEF runwb as INT
DEF wb as window

SUB BrowserWindow(wb:window,x:int,y:int,w:int,h:int,wcap:string,parent:int,mainwb:pointer)
If w=0 then w=480 : If h=0 then h=640
wcap="Test Browse"
parent =0
OPENWINDOW wb,x,y,w,h,@SIZE|@NOAUTODRAW|@MINBOX|@MAXBOX,parent,wcap,&mainwb

If ATTACHBROWSER(wb,"http://www.google.com") = -1
    MESSAGEBOX wb, "Couldn't create browser control","Error"
EndIf

ENDSUB

SUB WaitWB
runwb = 1
WAITUNTIL runwb=0
CLOSEWINDOW  wb
End SUB

SUB mainwb
Select @MESSAGE
    Case @IDCLOSEWINDOW
        run = 0
EndSelect
Return
ENDSUB

Peter

  • Guest
Re: Web Browser
« Reply #31 on: July 28, 2013, 11:06:50 AM »
Hi Aurel,

What you want exactly, is in the stars.  :D
Your piece of source code is a chaos. This might help or not.
Code: [Select]
int runwb
int wb

SUB BrowserWindow(int wb, x, y, w, h, string wcap, int parent, *mainwb)
    If w=0 then w=480 : If h=0 then h=640
    wcap="Test Browse"
    int parent=0
    OPENWINDOW wb, x, y, w, h, @SIZE|@NOAUTODRAW|@MINBOX|@MAXBOX, parent, wcap, mainwb
    If ATTACHBROWSER(wb,"http://www.google.com") = -1
       MESSAGEBOX wb, "Couldn't create browser control","Error"
    EndIf
END SUB

Sub WAITUNTIL()
    while runwb >0
       Sleep 10
    wend    
End Sub

SUB WaitWB()
    runwb = 1
    WAITUNTIL runwb=0
    CLOSEWINDOW  wb
End SUB

SUB mainwb()
    Select @MESSAGE
    Case @IDCLOSEWINDOW
        runwb=0
    End Select
END SUB

JRS

  • Guest
Re: Web Browser
« Reply #32 on: July 28, 2013, 11:18:36 AM »
Aurel,

Why do you use products with no future and the author in jail? I have shown you how to use the IUP web browser control with little effort. Do you have a phobia with using IUP or are you just into abuse? (@Charles: a repost of the O2 mascot in black leather may be appropriate here.  :o )

John

Aurel

  • Guest
Re: Web Browser
« Reply #33 on: July 28, 2013, 12:22:33 PM »
John ...please don't post rubish.
EBasic what matter you or me think is not so bad and provide the easiest aproach to lunch
browser window contained in dll shape,so nobody care about EBasic etc than point is how to
call function from this dll,ok.

And about IUP ,as you know i don't wanna use nothing already bloated into another dll
where i don't have a clue what is inside, on this way every function inside that dll will be transparent
and released as open source...ok.

so no need for any kind of drama ;)

PS.If this method will not work i will look again into webbrowser.cpp source of creative Basic .

Aurel

  • Guest
Re: Web Browser
« Reply #34 on: July 28, 2013, 12:37:20 PM »
Quote
Your piece of source code is a chaos. This might help or not.
;D
Not help but thanks anyway on try,infact you give me idea how might be solved.
But i still need to see what Charles have to say ,EB have different system for pointers and it looks that
more tweaking is needed.

Charles Pegge

  • Guest
Re: Web Browser
« Reply #35 on: July 28, 2013, 12:49:00 PM »
Putting up a browser from scratch in Windows, seems to be quite complex. Some C source code would be very useful to study. (The FreeBasic COM-based browser example was very hard to follow )

IUP would be good if adopted for the entire App, as an alternative to Windows.

It is going to be hard work to produce a better browser than Chrome or Firefox :)


Aurel

  • Guest
Re: Web Browser
« Reply #36 on: July 28, 2013, 12:52:52 PM »
Charles...
My main problem is how to properly call functions  from this dll which i build with EB.
Please do you can look again into this simple code ?
Do i must use LoadLibrary or not?

I will try to build this dll with CDCL format if current shape is not proper,ok ;)

Maybe Kent know something about creating dll in EB ,because i think that he made few dll-s in EB
which he use with thinBasic... ::)

Aurel

  • Guest
Re: Web Browser
« Reply #37 on: July 28, 2013, 01:11:37 PM »
Uff i forget to add
in few first lines of dll source which enable exporting:
Quote
export myfunction
export myfunction2
:-\

Aurel

  • Guest
Re: Web Browser
« Reply #38 on: July 28, 2013, 01:58:17 PM »
small step forward...
after adding export statment i can open browser from dll but only as external window which is not
what i want,i want open browser window like child window( something like scintilla control) :-\

Charles Pegge

  • Guest
Re: Web Browser
« Reply #39 on: July 28, 2013, 04:55:36 PM »
Sorry I can't help. I know nothing about eBasic, or Browser interfaces, apart from what I see @Jose/PB and @Freebasic.

Aurel

  • Guest
Re: Web Browser
« Reply #40 on: July 28, 2013, 08:31:50 PM »
No problem Charles
As i say ,it work as external browser window  ;)
I will wait what Kent have to say...

Aurel

  • Guest
Re: Web Browser
« Reply #41 on: July 29, 2013, 06:19:34 AM »
Hey Kent...where are you :)

JRS

  • Guest
Re: Web Browser
« Reply #42 on: July 29, 2013, 10:50:18 AM »
Quote
Hey Kent...where are you

Last I heard he was working on his IUP centric cross platform application generator. His integrated help system uses the embedded IUP web browser control and the new IupScintilla control for code editing. I haven't received a response yet if he has any interest in embedding SB for his scripting needs.  :o

It looks like you need to get the lead out and find a solution for RubenDev soon. Paul isn't up for a parole hearing for another 10 years so you're on your own.

Aurel

  • Guest
Re: Web Browser
« Reply #43 on: July 29, 2013, 11:03:25 AM »
Don't worry will be solved soon, i just need to what type of variable i need to return from dll.
As i say it work like external window but not as child -embeded window. ;)

JRS

  • Guest
Re: Web Browser
« Reply #44 on: July 29, 2013, 11:21:02 AM »
Hint EB is running the browser control in a OCX container. (ATL) Are you providing the same container in O2?