Welcome, Guest
Username: Password: Remember me
Components and Libraries for Web Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Web Browser 12 years 8 months ago #1742

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
Hello everyone!
I wonder if there anything to replace Delphi's TWebBrowser component?
I know there's html panel (all systems) and gecko engine (under win), but I would have been fine with it, if only I could:
- use embedded elements (video (let's say from youtube, for example), audio, some flash and java applets);
- use css styles;
- use javascript (not really so needed, but IE engine in Delphi can do that);
So if there any free component (maybe just for windows), that can perform all this things? And what could I do to help that component to appear in CT? I'm not so good to deal with interfaces (at least I never tried), but still, what I can do?
コンソールマニアック

Please Log in or Create an account to join the conversation.

Re: Web Browser 12 years 7 months ago #1818

  • Gintas
  • Gintas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Graphics Designer/Developer
  • Posts: 32
  • Thank you received: 3
There is some tiny library writen in C. Maybe somebody could port it since
FPC can easily link .a libs.
Tiny Browser

Please Log in or Create an account to join the conversation.

Re: Web Browser 12 years 6 months ago #1885

  • avra
  • avra's Avatar
  • Visitor
  • Visitor
Search Lazarus forum. I think it had examples of embedding IE on a form.

Please Log in or Create an account to join the conversation.

Re: Web Browser 12 years 6 months ago #1892

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
gintasdx, thanks, I'll lok into that ;)

avraIt does. And I've already tested that. But that's not what'll work for me, 'cause to make embedded IE have alclient alignment I have to set "Fulscreen" property to true. And in that case some of the IE is "invisible". Well, if you'll try it, you'll see what I'm talking about. I still could set width and height, but that works only if fulscreen is false and in that case I end up with IE caption visible.
コンソールマニアック

Please Log in or Create an account to join the conversation.

Re: Web Browser 12 years 6 months ago #1916

  • Rain
  • Rain's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 71
  • Thank you received: 8
Not tried, but as guesswork: Not using Fullscreen, but a Form placement with

Form1.top := -30; // mind the minus

and Form width and height according to screen ccordinates ( + 30 for height) may do the trick, simulating full screen without the side effects of fullscreen.

Please Log in or Create an account to join the conversation.

Last edit: by Rain.

Re: Web Browser 12 years 6 months ago #1926

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
Well, it works, but the system menu of IE pops when I'm press alt, so it's not a good way...
Anyway, now that's unimportant since Lazarus 1.1 has ActiveX component and a long-wated tool to import type librares!
Here's wiki article: wiki.freepascal.org/LazActiveX .
Despite I couldn't make late binding with IE to work, the EARLY binding works great (and that is the way I used to in Delphi), so IE problem (and many others) is solved.
Thanks to all who replied! ;)
コンソールマニアック

Please Log in or Create an account to join the conversation.

Re: Web Browser 12 years 6 months ago #1931

  • Rain
  • Rain's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 71
  • Thank you received: 8
Ok, ActiveX is the best solution for the given task.

But as a general (platform independent) solution for suppressing unwanted keyboard events, this code helps:

Set in Form1 property editor: KeyPreview := True
to make the following code working:

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key = 18 then Key := 0; // 18 = Alt-Key
end;

Please Log in or Create an account to join the conversation.

Last edit: by Rain.

Re: Web Browser 12 years 6 months ago #1933

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
I knew this trick ;)
(I'm just 1 year with lazarus, but there were 6 years with Delphi, so... )

But have you tried this code? Cause IE is very stubborn when it comes to overriding some part of his (well, I believe such a notorious browser must have a personality ))) default behaviour.

Not to mention "keypreview" intercepts far from "all" of key events. Especially when ole (or com) object is focused (like flash or that IE we're taking about). Anyway, at first I need to override alt key, then I probably begin to think of IE having some bars and trying to hide them... So, saying about system menu I was driving at impossibility to think ahead of different (pardon me, English isn't my native language) possibilities.

As for "cross-platform" term - I'm in no need of suppresing anything for platform-independent projects, 'cause if I'm gonna use smth external - I'll do it "wide & open" ;)

It's normal - when smbd use browser - just open it in the system's default one. If someone want to use pdf functional then, I believe, he (or she) not may, but must use system's default document viewer :) So, why am I bothered myself to use IE and even disturbed you? (I highly appreciate your help, really, thanks alot!)

Warning: Spoiler!

One more time - Thank You for your time! ;)
コンソールマニアック

Please Log in or Create an account to join the conversation.

Last edit: by 4aiman.
  • Page:
  • 1