I am using dcef3 and Delphi XE2. When the URL changes I would like to detect it and show a delphi message displaying the new URL. Can this be achieved? I am trying to use the URL to pass delphi some commands to execute.
Thank you for your help and apologies for my bad English.
It seems you are looking for the OnAddressChange event. This event is fired when the frame's address has changed. The new URL of the frame you can get from the url parameter.
Related
I'm trying to create a hyperlink (external URL) in a TfrxMemoView object but the link redirects me to a local directory, what's happening? Am I doing something wrong or is it some limitation of the tool?
In the Hyperlink Editor I add the basic link in the variable link_application (https://myapplication.host.com/rest/mywebservice/) together with a variable field of the report, so that I create a link to a webservice.
At the end, the link redirects me to the following location:
file:///C:/users/myUser/Desktop/'https://myapplication.host.com/rest/mywebservice/354310'
What it should be:
https://myapplication.host.com/rest/mywebservice/354310
The above problem was a bug from version 5.4.6 of Fast Report VCL 5, which was the version I was using.
In the latest version (5.6.18) the bug has already been fixed.
I got a Form that are using a DLL.
Have a way to get the Handle of the Form through the DLL?
Something like this:
SetWindowText(HandleOfTheForm, 'This Program is using my DLL');
Sorry by the grammar mistakes.
There is no way for the DLL to automatically discover the Form window without having some prior knowledge about it. Either the Form itself needs to tell the DLL which HWND to use, such as by a function that the DLL exports, or by giving the Form a known/predictable class name and/or window title that the DLL can look for, such as by using FindWindow() or EnumWindows().
A better option is to write the DLL to expose a callback that the Form can assign a handler to, then have the DLL call it when needed and let the Form decide what to do when called. That way, the DLL does not need to know anything about the Form at all.
How can I send a mouse onclick message to TWebBrowser in Delphi? The OnClick message must be sent to specific control appears in website.
for Example i have a radio button appears in the website named XXXRB and I want send the message to that Radio button (which is named XXXRB) to select it.
How can I do it?
Regards.
can you call JS from Delphi ?
http://www.delphidabbler.com/articles?article=21
http://jansfreeware.com/articles/delphi-ie-javascript.html
http://www.programmersheaven.com/article/12946-How+to+call+JavaScript+functions+in+a+TWebBrowser+from+Delphi/info.aspx
probably there should be way
http://www.roseindia.net/javascript/javascript-click-method.shtml
To locate the control DOM Object you may try collections such as GetXXXByName or libraries like jQuery or custom JS code.
however that is the question on Internet Epxlorer + JavaScript, not on Delphi.
No need for javascript as Arioch implies.
You can have access to the complete DOM via TWebBrowser.Document.
There are many resources on the net on this subject, this is the most complete one:
http://www.cryer.co.uk/brian/delphi/twebbrowser/read_write_form_elements.htm
if you look around on SO you also will find some snippets.
I am trying to send a record from one dll to one exe.
The dll is an Outlook add-in I wrote, the exe is my main application.
I used this example to succesfully send a record from exe to exe, but when I try to do the same from dll to exe it doesn't work.
Note: please open the link and there you find the code I am using. That code is for an EXE sender application and a EXE sender application. This works.
If I put the sender code inside a dll the example doesn't work anymore.
Could you suggest a solution?
Assuming that you can make it work with a string (which remains to be seen), you could simply serialize your record to a string (CSV, possibly using a weird delimiter like ~), send as a string (PAnsiChar or PWideChar), then de-serialze back into the record at the other end. This isn't as elegant as what you want, but absolutely, positively, will work.
How can I get the source of a webpage that is currently running in an instance of firefox using delphi ? I would like to do this without making firefox the active window first if that is possible but just grabbing the source is my primary question.
TIA,
Dave
This might help
How to embed a browser object, other than IE<n>, in a Delphi application
This is about embedding firefox (amongst others) but has lnks to other pages that shows methods that you can navigate the DOM with.
I'd look at using IE if possible it's fairly well documented how to do this in IE.
Obligatory "here's one way, but don't do it" from the ClipBoard guy....
One ugly hack I've seen is to send keystrokes to the app and force it to copy/paste the data to the clipboard. Don't go down this road. It will work, for you, in a controlled environment. It won't work for your users, who will experience compatibility issues, unexpected trashing of their clipboard data, and crashes from other apps that are monitoring the clipboard for updates.
And no, you cannot save/restore the clipboard without causing even more trouble.