Delphi TChromium Load From Variable Function Not Working

I'm trying to execute this code in Form1.Activate Event:

Chromium.Browser.MainFrame.LoadString('<html>erg</html>', '');

But i get ACCESS VIOLATION error, whats a problem? What i'm doing wrong?

Here is Code(not full):

    //-------------------------FORM ACTIVATE BEGIN
//Get Task Panel Size BEGIN
TPanel.cbSize := SizeOf(TPanel);
ShAppbarMessage(ABM_GETTASKBARPOS, TPanel);
Task_Panel_Size:=(TPanel.rc.bottom -;
//Get Task Panel Size END

    //Maximaze BEGIN
    //Maximaze END

    //Load Default Page\\\\\\\\\\\\
    //Load First Part--ExtractFilePath(Application.ExeName)+'Apps\Speed_Dials\index_Part1.html'
    Chromium.Browser.MainFrame.LoadString('<html>erg</html>', '');

    //-------------------------FORM ACTIVATE END

Problem is Solved, The Problem Was in that, what this Method not works in Delphi7 and thefor gives ACCESS VIOLATION error. But it works great in Delphi 2010 :) Thanks to everybody for helping :)

Have you tried on Form1.Create Event? Does it require it to be created as in "Chromium.Create"?

try this

  frame: ICefFrame;
  source: ustring;
  if Chromium.Browser = nil then 
   showmessage('Not created');

  frame := Chromium.Browser.MainFrame;
  source := '<html>erg</html>';
  frame.LoadString(source, '');


Load HTML text from delphi, I can load a local html file without problems, but I cannot load the value directly from the application using a Tmemo or variable string for example. TChromium has a LoadString procedure that used to be recommended for these cases. function EncodeBase64(const Input: TBytes): string; const Base64:  I can successfully raise an event from JS into my delphi application using the technique described in this link: Delphi Chromium Embedded - communication between Javascript and application code Now I want to return a value from a function that called in JS. I test this case: I raise an event in the function that assign a variable in delphi.

In Delphi 7 I kept getting an access violation error and changed

frame := Chromium.Browser.MainFrame;


frame :=Chromium.Browser.GetMainFrame;

I don't know why that works because I'm totally rubbish at this, but it does. Hope this helps someone.

tchromium - St4k, Delphi TChromium Load From Variable Function Not Working. delphitchromium. Jul 14 '13 7:58. Priler. 45. 8. votes. 3. answers. 4,714. views. Enumerating DOM  i was success to show a HTML source display in Chromium browser .. but how i can show that html source in memo.text on delphi form ?! i hope someone can help me .. my english is not so good .. i was read many topic but i cant really understand what they mean ,,

you sould add second parametr about:blank ie.

TChromium.Browser.MainFrame.LoadString ('<html>something</html>', 'about:blank');

Delphi Chromium Embedded, Delphi TChromium Load From Variable Function Not Working Ask Question But i get ACCESS VIOLATION error, whats a problem? What i'm  (Delphi uses the documented return value to generate an exception if it is not S_OK). Notice that the help entry for pvarRet says it always returns VT_EMPTY. This means that execScript on Delphi always returns and empty variant, not the JavaScript function return value that we may have expected.

Scientific and Technical Aerospace Reports, Delphi Chromium Embedded - How Can I Return A Value From Js Function Into Delphi. loading Rate this:  i use Register function of TCefRTTIExtension Class to register an appName, to call my delphi app from JS running in the chromium. the code is well and i have no problem, but after calling the delphi function more and more the VM Size of application grows up and the memory consumption increases.

[PDF] The Delphi Method: Techniques and Applications, variable camber concepts 21 p.2758 N78-30108 MANeuver ABLE REENTRY 10 p.1271 N78-19217 Ionic model for chromium, manganese and iron impuntics p3127 N78-32746 The statistical manipulation of delphi statements 24 p3296 tasks as a function of control type task loading and vibration --- aircraft throttle  Quero usar o TChromium para fazer um navegador com o Delphi. Mas não estou conseguindo acessar qualquer página com ele. Já usei os comandos: Chromium1.Load(''); Também: Chrom

How to call JavaScript functions in a TWebBrowser from Delphi, endeavor which are not candidates for application of Delphi. It is interesting to note that the alternative method of handling this problem at that time would currently with estimates he could analytically infer from the processing load the awareness of the problem among potential customers both as a set of variables. It is important to note that we return the value from a function in a special variable called Result that Delphi secretly defines for us to be the same type as the return type of the function. We can assign to it at any point in the function. When the function ends, the value then held in Result is then returned to the caller.

  • Where in that chained member access is the AV. Break it into multiple lines with a single member access on each. Also, don't hide the error message from us. Give the full error message, verbatim.
  • Full errror is: Access violation at address 0047EB20 in module 'Project1.exe'. Read of address 00000000.
  • There is no Create method
  • Using this, i get this: [Error] Unit1.pas(117): Undeclared identifier: 'ICefFrame' [Error] Unit1.pas(118): Undeclared identifier: 'ustring' [Error] Unit1.pas(141): Missing operator or semicolon [Error] Unit1.pas(141): Incompatible types: 'Cardinal' and 'String' [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
  • Try ustring as they use that in there demo apps from what I read and also show a message box if Chromium.Browser = nil then you will know if its actually created or not
  • I have forgot to include ceflib.pas file into my USINGs :) Thanks for helping, it works very well!
  • Hmm, Your code is working, but if i'm using this : Chromium.Browser.MainFrame.LoadString('YO',''); Its not works, why?