Recent

Author Topic: Webbrowser(IE) for Lazarus Demo  (Read 42678 times)

SunyD

  • Guest
Webbrowser(IE) for Lazarus Demo
« on: July 01, 2010, 09:35:28 am »
EDIT:
You don't need this anymore!
Look here: http://wiki.freepascal.org/LazActiveX
Import Internet Explorer as ActiveX same as in Delphi:
Lazarus > Menu > Tools > Import ....
Select C:\WINDOWS\system32\shdocvw.dll
-------------------

I created a webbrowser(ie)-dll for lazarus. We can now use webbrowser component from internet explorer. It is basic demo. I will extend and put it in a lazarus component like TWebbrowser from delphi.

And for Linux i will use webkit/gtk. Like look here:
http://freepascal-bits.blogspot.com/2009/10/webkit-experimenting.html
But this examples chrashes often in my ubuntu10. Have anyone solved it?

I couldn't upload codes because it was bi. 849 kb. The dll is 176 kb and will be finally 180-250 kb.

Edit:
For sources look topic #9 : http://www.lazarus.freepascal.org/index.php/topic,9762.msg48351.html#msg48351
« Last Edit: December 31, 2012, 12:40:45 am by SunyD »

Jishaxe

  • Full Member
  • ***
  • Posts: 103
  • Hobbist Programmer
Re: Webbrowser(IE) for Lazarus Demo
« Reply #1 on: July 01, 2010, 11:11:22 am »
Brilliant!
I was waiting for something like this.
Thank you :)
Linux Mint 12
Windows 7 Home Premium
______________________
Definition of programmer: An organism that converts caffeine into software.

SunyD

  • Guest
Lazarus Webbrowser(IE) - I added source + exe files.
« Reply #2 on: July 01, 2010, 12:03:20 pm »
Reply #9: http://www.lazarus.freepascal.org/index.php/topic,9762.msg48314.html#msg48314
I added demoprogram(source + exe).  You can recompile or play with it :)
The dll is still simple. I added some Events:
-OnStatusTextChange
-OnTitleChange
I will add more functions.

Here is download link:
http://www.megaupload.com/?d=3JJACC6O
File name:lazwbdemo.zip
Size:854.27 KB
« Last Edit: December 31, 2012, 12:31:55 am by SunyD »

SunyD

  • Guest
Added more Functions and Tabbedbrowser example
« Reply #3 on: July 03, 2010, 01:22:44 am »
Reply #9: http://www.lazarus.freepascal.org/index.php/topic,9762.msg48314.html#msg48314

I added more functions and created component.
There is no packpage for component because I testing it. Not recommended install it!

Downloadlinks:
1. More Extended version.
lazwblibdemo-component.zip
http://www.megaupload.com/?d=RZEDPMP0
873.75 KB

2. Early demo. Download it only if you want to see how to use webbrowser without TWebbrowser component. You can delete the in the zip the files *.jpg and webbrowser.pas. They are old. I forgot them to delete.

lazwblibdemo-nocomponent.zip
http://www.megaupload.com/?d=Q2VLZP3S
902.84 KB

Both zip-file contains *.exe + lazarus-source.

+Screenshot from component-version:

« Last Edit: December 31, 2012, 12:32:11 am by SunyD »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Webbrowser(IE) for Lazarus Demo
« Reply #4 on: July 03, 2010, 01:41:16 am »
Once you've got a package for installing your component (.lpk) you might consider adding a topic to the CCR page:

http://wiki.lazarus.freepascal.org/Components_and_Code_examples

You don't need any special privileges to do that.

Then commit your source to the CCR SVN. Contact Vincent to request access.

Finally, add a subtopic to the main Web browser page in the Laz wiki:

http://wiki.lazarus.freepascal.org/Webbrowser

Note: Don't commit executable files to SVN; in general, it's not too good an idea to include in .zip's either. Let people compile the demos themselves by following your instructions.

Thanks.

-Phil

Caronte

  • New member
  • *
  • Posts: 7
Re: Webbrowser(IE) for Lazarus Demo
« Reply #5 on: July 04, 2010, 01:14:04 am »
And... what's happen with Mac OS X users :'(

wOvAN

  • New Member
  • *
  • Posts: 47
    • wxSoft.Ru
Re: Webbrowser(IE) for Lazarus Demo
« Reply #6 on: July 04, 2010, 10:39:36 am »
SunyD To start the demo  on Win7 x64 (ie8), it requires  mfcans32.dll and oc30.dll.

 

Goodman H__

  • Full Member
  • ***
  • Posts: 130
Re: Webbrowser(IE) for Lazarus Demo
« Reply #7 on: July 04, 2010, 03:25:49 pm »
Hi SunyD,

I am eager to try the webbrowser component but I can not open the link you provided.Could you please attach it in this forum since it is very small in size.

Thank you so much!

Best Regards,
Sam
« Last Edit: July 04, 2010, 03:35:29 pm by Goodman H__ »
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Webbrowser(IE) for Lazarus Demo
« Reply #8 on: July 04, 2010, 05:56:41 pm »
SunyD To start the demo  on Win7 x64 (ie8), it requires  mfcans32.dll and oc30.dll.

 
Even on WinXP it asks for oc30.dll

SunyD

  • Guest
Re: Webbrowser(IE) for Lazarus Demo
« Reply #9 on: July 05, 2010, 12:16:12 pm »
"... it requires  mfcans32.dll and oc30.dll. ... "
I used for smaller dll-size Delphi 2 and i have this files :D I see d2 uses ocx-components and this isn't good.
I compiled now for you the dll with delphi7 and used TWebbrowser-Component.

Download link (contains Lazarus project src + d7-compiled dll) :
http://cid-96bfddbfe0bf46f2.office.live.com/self.aspx/Lazarus%20Webbrowser%5E5IE%5E6%20Lib/lazwblibdemocomponentd7dll.zip
The source code is not changed only compiled with d7! If you run demo-project inside lazarus-ide you get at end exeception "EXternal: SISEGV".

And now in delphi7-dll version you will se in demo project as page-title, url or status-text only some characters it's normall because i don't handled unicode strings.
Maybe you must use PCharToUtf8 or some else in demo-project. I have never used unicode strings.

This is only demo/test versions. I will publish dll-source code too.

You can download all files form my live space now:
http://cid-96bfddbfe0bf46f2.office.live.com/browse.aspx/Lazarus%20Webbrowser%5E5IE%5E6%20Lib


EDIT:
I added dll-source now. You need to download onyl this one:
http://cid-96bfddbfe0bf46f2.office.live.com/self.aspx/Lazarus%20Webbrowser%5E5IE%5E6%20Lib/dlltd.zip
(dll-source + lazdemo source + compiled dll )
Read "readme"-file from zip.
« Last Edit: July 05, 2010, 03:52:26 pm by SunyD »

Goodman H__

  • Full Member
  • ***
  • Posts: 130
Re: Webbrowser(IE) for Lazarus Demo
« Reply #10 on: July 06, 2010, 02:51:19 am »
Thank you so much!
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

iskraelectrica

  • Newbie
  • Posts: 4
Re: Webbrowser(IE) for Lazarus Demo
« Reply #11 on: July 07, 2010, 11:31:28 pm »
The demo program with FPC compiles and runs correctly, using the supplied DLL.

The DLL source code does not compile with FPC, due to the dependencies of many units of DELPHI (stdVCL, AxCtrls, ActiveX and others) :'(

Timewarp

  • Full Member
  • ***
  • Posts: 144
Re: Webbrowser(IE) for Lazarus Demo
« Reply #12 on: September 10, 2010, 06:39:03 pm »
Hello!

Thanks for effort, but I don't believe it's best way to create dll using Delphi. :)

Why not do it like Delphi does? I think there are lot of people interested in this, and it doesn't matter it's Windows only. It may not even be too difficult..

Anyway, you can already use IE very easily with comobj, if you need to access web, etc.. Simple example:

Uses Windows, Comobj;

procedure TForm1.Button1Click(Sender: TObject);
var browser: olevariant;
begin
 browser := CreateOleObject('InternetExplorer.Application');
 windows.setparent(browser.hwnd, form1.handle); // you can use panel1.handle, etc..
 browser.toolbar:=false;
 browser.fullscreen:=true;
 browser.Resizable:=false;
 browser.visible:=true;
 Browser.Navigate('http://www.lazarus.freepascal.org/');
end;     

vsrawat

  • Newbie
  • Posts: 1
Re: Webbrowser(IE) for Lazarus Demo
« Reply #13 on: December 03, 2012, 08:10:54 am »
megaupload is banned. We can't download the program from that.

please upload it on some other site for us to use.

Does it work in ie9-ie10 32/64 bit, w7/8?

Thanks.
--
Rawat

SunyD

  • Guest
Re: Webbrowser(IE) for Lazarus Demo
« Reply #14 on: December 31, 2012, 12:26:57 am »
megaupload is banned. We can't download the program from that.

please upload it on some other site for us to use.

Does it work in ie9-ie10 32/64 bit, w7/8?

Thanks.
--
Rawat

Sources are on Skydrive read here:
http://www.lazarus.freepascal.org/index.php/topic,9762.msg48351.html#msg48351

Link to Download from above:
http://cid-96bfddbfe0bf46f2.office.live.com/self.aspx/Lazarus%20Webbrowser%5E5IE%5E6%20Lib/dlltd.zip

You don't need this anymore! Look here:
http://wiki.freepascal.org/LazActiveX

 

TinyPortal © 2005-2018