Recent

Author Topic: I cannot open a web page using CEF4Delphi.......HELP Please  (Read 726 times)

laurence lockwood

  • Newbie
  • Posts: 2
Ok, So I am using FPC 3.2.2 with Lazarus 2.2.6. Windows 7 operating system, 32Gb ram, Asus ROG m/board, Intel Chipset.
CEF4Delphi package is installed and units are listed as per required. Compiles fine on CTRL+ F9, but nothing happens.
On Form create, I've got
GlobalCEFApp := TCefApplication.Create;
Then, GlobalCEFApp.GlobalContextInitialized;
Then I have put:-
While not ChromiumWindow1.CreateBrowser Do
 Begin
   // Timer1.Enabled := True;
 ChromiumWindow1.CreateBrowser;
  Application.ProcessMessages;
 End;
The timer1Timer procedure is taken out because it still didn't work.
The components are:-
ChromiumWindow1;
Timer1;

My Button on my form is called ChromeWeb
On the 'Click Event':-
ChromiumWindow1.CreateBrowser;
Timer1Timer;
ChromiumWindow1.initialized;
  if ChromiumWindow1.Initialized then
  begin
    // Load the desired URL
  ShowMessage('Initialized');
    ChromiumWindow1.LoadURL('https://www.google.co.uk/');
  end
  Else
  Begin
  Timer1Timer;
  ChromiumWindow1.Initialized;
  ShowMessage(' NOT Initialized');
  End;
After all that I get diddly squat.......I have read all the demos and tried to get it right but I think I am missing something.
What am I not doing? It is driving me nuts. It is only a hobby but it beats watching TV all night.

Please help......

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #1 on: June 20, 2023, 05:30:49 pm »
I am merely repeating the official docs:
Quote
Since CEF4Delphi uses the latest CEF branch, it's not compatible with Windows 7, 8/8.1, XP, Windows Vista, Windows Server 2003, Windows Server 2008 and Windows Server 2012.
Whether or not that (still) applies, I have no idea.

laurence lockwood

  • Newbie
  • Posts: 2
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #2 on: June 20, 2023, 06:45:12 pm »
TRon, Thank you so much. I didn't actually see that bit. I have been trying to get this to work for weeks........At least I now know I need to upgrade. Thank you again. BR

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #3 on: June 20, 2023, 06:54:51 pm »
You're welcome laurence,

The only problem is that I do not know which version of CEF4Delphi and chromium you use. On that same page is a mention of the last CEF4Dephi version that works with Windows 7 (and which version of chromium that requires).

That means that in theory it is possible to get it working on your current version of Windows. Whether that is a good or bad idea to pursue, I (also) can't tell.

Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #4 on: June 20, 2023, 07:25:18 pm »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #5 on: June 20, 2023, 07:39:51 pm »
Please use codetags....
[ code=pascal ] ... [ /code ]


Have you tried TBrowserWindow ?

It should handle the context, and wait for creation, and then you get an event OnCreated.

----
You do app.ProcessMessages, you may also have to do GlobalCEFApp.DoMessageLoopWork; and not sure what else....

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: I cannot open a web page using CEF4Delphi.......HELP Please
« Reply #6 on: June 21, 2023, 09:48:15 am »
Hi,

As TRon said, Windows 7 is no longer supported by any Chromium based web browser. This is a Google decision and we can only use outdated browser versions or upgrade to Windows 10.

If you decide to keep Windows 7 then you can only use this CEF4Delphi release : https://github.com/salvadordf/CEF4Delphi/releases/tag/109.0.5414.120

This is also a problem for WebView2 users so you will have the same problem if you try WebView4Delphi.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

 

TinyPortal © 2005-2018