Hello everyone. I need some info about OleContainer. I embedded an OleContainer in the browser. And when I launch that html file,a microsoft word OleContainer is opened and I want to display content of a doc file from the web. For example, when I open html file, OleContainer should view the content of the www.example.com/example.doc whi...
host:127.00.0.1;
port:5001;
ReadTimeout:3000;
//Following codes to get the response
procedure TForm1.Button2Click(Sender: TObject);
var
s:string;
begin
try
while True do
begin
s := s+IdTCPClient1.IOHandler.ReadChar();
end;
finally
showmessage(s);
....other operations...
end;
//....
When timerout the part...
I'm using some asp net stored procedures and I do not want edit them.
The trouble is when ThisProcedure returns no Field I need.
Query->FieldByName("RoleName") // delphi : Query.FieldByName("RoleName") (for TAG %D)
and sometimes it works, sometimes I've got error : CommandText does not return a return set
I can't avoid it using try c...
I have a query with parameters inside a Devart TMSQuery.SQL. Something like
select * from customers
where customer = :CustomerID
in code I do
// Delphi
sqlcustomer.ParamByName('CustomerID').asinteger := 4;
sqlcustomer.open;
I want to debug and see the exact sql command sent to the server, if I try to use TMSQuery.sql I just have th...
I am trying to display an activity indicating overlay (a spinning circle of dots) during a lengthy operation in my application. For this, i created a borderless transparent form with a TImage and an Imagelist, which i sought to update in a thread during the time the main thread is busy.
The problem i encountered is that the lengthy oper...
Is there a translation/localization sub-project for the JEDI Code Library?
I'm especially looking for German, French and Italian versions of JclResources.pas and JclVclResources.pas (and might be able to contribute to a German translation myself). Is anything like that already in the works or did I even just fail to find it in the origi...
I want to have two procedures which can call each other, or be called from whatever threads are running, but only have one running at a time. How can I do this? Will this work correctly?
var
cs: TCriticalSection;
procedure a;
begin
cs.Acquire;
try
// Execute single threaded here.
finally
cs.Release;
end;
end;
proce...
To avoid entering single quotes. But got error while compiling the project - '[Fatal Error] StdCtrls.pas(1238): Unit Dialogs was compiled with a different version of StdCtrls.TEdit'
...
I would like to run a small routine whenever the ActiveControl changes. How can I do this? I thought about having a timer that checks the active control at certain intervals, and fires my routine when it changes, but is there a more elegant solution?
...
Hello everybody,
i have a dilema on how threads work in delphi, and why at a moment when a thread should raise an exception, the exception is not showed. bellow is the code with comments, maybe somebody cand explain to me how that thread, or delphi, is managing access violations
//thread code
unit Unit2;
interface
uses
Classes,
...
We are using a Delphi TServerSocket and want to assign a port automatically.
How can we find an open port in Delphi 7?
...
After upgrading to Windows 7 all seems to work in my Delphi 2007 version except this one.
I know that 2007 is not build for win 7 but I'm not sure that the OS is the reason. My friend is using it without a problem.
When I use "Find Local References" all is fine.
Do you know a fix for this? Some dll registration may be?
...
I can fill a TreeView control with particular Registry keys by enumerating registry keys recursively and put them in the TreeView control; then for performance reason, I attempt to
use a nonrecursive/iterative approach to enumerate registry keys, but how can I fill the TreeView since a "tree" is naturally recursive (at least, in my under...
Possible Duplicate:
How can I use Delphi to test if a Directory is writeable?
My program will download an update for the user if they request it. The user has to specify the location to save the installer. They might pick a directory which they don't have access to save something to. In this case the download starts (downlo...
I noticed that the message WM_NCHitTest isn't sent to a form when the cursor is inside the caption bar (not on the border).
I tried to intercept it using either
procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
or
procedure WndProc(var Message: TMessage); override;
According to MSDN I was expecting to receive...
How can i determine who called the Showme Procedure?
procedure Showme(str:string);
begin
ShowMessage(str);
end;
procedure btnclick(sender:TObject);
begin
Showme("test");
end;
procedure btn2click(sender:TObject);
begin
Showme("test");
end;
Edit : The Confusion
Showme(654, '654'); // procedure name, string
Showme(654, '564');
...
Hello everyone,
I'm user of delphi 2010, my current machine is intel core i7, running windows 7 x64. I've write the following codes:
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
FCount: ...
Hello
I have an accuracy problem with a reporting tool that I'm using. The issue is that it is reading in data from a TADODataset on the fly but converting the ftBCD fields into doubles.
This causes rounding errors when performing operations at the reporting level (sums, etc).
I'd like to specify my currency fields as ftCurrency, not ...
Hi!
We got a DLL written by C# programmers, compiled to usable as COM object.
We consult these developers to get the function names, and syntaxes, and we can use it after we registered it with regasm.
This is ok, but we have more questions to produce faster development (on changes), and some things are not understandable or not workin...
I want to detect when a Disk ( CD / DVD ) or an USB inserted or removed.
I know that I should work with WM_DEVICECHANGE message , but my problem is getting the Volume ( Letter ) of the Drive , I tried to Get it by WMI Query and Win32_VolumeChangeEvent too but I could not!
there is an Example and work fine , how can I do this by Delphi?...