2

I want to close my delphi program from TChromium component.But i can't do this.I tried to put TPanel above TChromium,but it is wrong,program have an error "Invalid CEF library version".Also i tried to use TImage,but TImage don't stay above TPanel.Somebody can help me?

LeeAttila
  • 75
  • 1
  • 6

1 Answers1

1

use the OnAddressChange in TChromium.

Add a hyper Link same <a href="exiting.exit">exit</a> in your html document after then write OnAddressChange:

if (url = 'exiting.exit') then
self.close;

this a simple fast way.

A1Gard
  • 4,070
  • 4
  • 31
  • 55
  • Thank you.But this code close document,not delphi program.I need to close Delphi 7 Application. – LeeAttila Feb 19 '14 at 05:12
  • I write use this code: if (url = 'exiting.exit') then Form1.Close; – LeeAttila Feb 19 '14 at 05:14
  • In real, you have used a link target to the `exiting.exit` file which is expected to be stored in the path relative to the current frame's path, so expecting only this target in the `url` is not a right way. Besides, you could rather cancel the navigation in the `OnBeforeBrowse` event without navigating to that target. – TLama Feb 21 '14 at 12:39