i have tested a couple of benchmarking snippets on delphi like this one:
uses
...diagnostics;
procedure TForm2.Button1Click(Sender: TObject);
var
i,elapsed : integer;
stopwatch : TStopwatch;
ff: textfile;
begin
if FileExists('c:\bench.txt') then
DeleteFile('c:\bench.txt');
stopwatch := tstopwatch.create;
s...
So, I have a form with a few dozen controls and someone would like to save & later restore their contents & settings - which radio button was selected, what was the Position of that up/down, etc
What's the simplest way to do it? DfmToString & reverse? Write/read a .INI ? Something else?
...
Given a record type:
TItem = record
UPC : string[20];
Price : Currency;
Cost : Currency;
...
end;
And the name of a field as a string, how can I get the offset of that field within the record? I need to do this at runtime - the name of the field to access is decided at runtime.
Example:
var
pc : Integer;
fieldName...
I am developing a Delphi application.
On TImage.MouseDown event I want to do X task if shift key is pressed, Y task if control key is pressed and Z task if any of them is not pressed. For that I am using TShiftState variable. Now I have a function in which I have to pass this variable as parameter.
procedure Something(keyState : TShif...
what is the easiest method to convert a PDF into a TBitmap image in delphi?
if there are any commercial available tools for delphi, I can buy one if it is reliable and or not expensive...
I am thinking of some kind of viewer which I can browse pages.. zoom... and export in the desired resolution..
...
I'd like to add an option to my application similar to the Skype's option "run Skype as my computer starts".
Skype doesnt't go on the "Auto start applications" of the start menu folder, I'd like to have the same effect.
Note, one answer to this question suggets to add a key here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVe...
I'm using Inno Setup to create an installer for my application. I'm currently filling a combobox (TNewComboBox) with the names of the Web sites on the current machine's IIS install. Now what I really want to do is store the COM object alongside the string in the objects property of the combo but keep getting type mismatch errors, even ...
Again I have a problem with the TClientDataSet.
I guess it's something really simple but I struggle on it for a while now.
Here's some code what shows what I want to do:
procedure TForm1.Button1Click(Sender: TObject);
begin
ClientDataSet1.Insert;
ClientDataSet1.FieldByName('anruf_von').AsDateTime := time;
ClientDataSet1.Post;
C...
Hi , i am writing a simple client/server chat program with indy 10 (blocking mode) and there is a question that how can i manage connections ?
for example imagine a user that is online on server , we must make a connection tunnel for future requests . In other words, when a user is online server should not need username and password for ...
Hi, guys! I believe I have a different problem.
We have some dozens of SWF files and we need remove a certain fill of each SWF file, to each frame! That fill is purple color and it should help, but we aren't SWF experts.
What we want is developing a tool (in Delphi, C++ or any language) able to read each SWF file and modify it, generat...
I downloaded JEDIVCL package.... according to its help i have to run install.bat from jcl folder and then run install.bat from jvcl folder. i launched install.bat from jvcl folder but i received this error:
and if run install.bat from jcl folder receive this error:
How can I solve this problem? if its possible give me steps to ins...
I am migrating to Postgresql, but I am facing a problem.
A "trick" I am using with SQL Server is to login always using a single user (tipically sa) and I write the program_name in the database connection to check the number of currently logged users in the application. Everytime I do a db connection for UserX I set the program_name in t...
I downloaded and tried installed the TNT Delphi Unicode components. I use Code Gear Delphi 2007.
Then I opened the TntUnicodeVcl_D70.dpk and tried to build it. The following message appeared
**The following changes must be made before this package can be compiled.
Choose OK to apply these changes and continue compiling
Remove TntAc...
After many months of postponing it, this week, I finally started using a new Windows 7 Professional PC for actual development (which is 90% still done in Delphi 7 with some of these programs still using the Borland IDAPI to access Paradox files). The previous development pc was still an XP-one.
Every thing works except for one thing: so...
hey all
how to sort in tlistview with data present in subitem[x]
regards
...
My delphi application is incompatible with native keyboards. What should I do?
To explain more, first look at these pictures:
Here's an image of what an Italian keyboard looks like:
http://en.wikipedia.org/wiki/Keyboard_layout#Italian
You can find the normal one (United States keyboard) in the same page.
If we press the Shift+2 (or an...
I want to develop a delphi application with an HTML/CSS graphical user interface, not necessarily running from within a web browser. I want to do this do create a richer graphical user interface with animations etc. and break away from normal VCL components / Windows look. Any suggestions?
...
Hi everyone,
I am using the OnMouseMove event to detect when the mouse pointer is over my TPanel, is there a way to know when the mouse pointer had moved away from it?
I need the panel to change colour when the mouse pointer is over it and return to its original colour once it moved away from it?
I am using Delphi 6 by the way.
Pleas...
Hi all, I have a service written in Delphi 2007 in which I'm trying capture any unknown exceptions. Assigning a method to the on exception doesn't seem to work ('Forms.Application.OnException:=UnknownApplicationException'). The 'UnknownApplicationException' doesn't appear to get called - I attribute this to the fact that there is no form...
Using Delphi 2010, let's say I've got a class declared like this:
TMyList = TList<TMyObject>
For this list Delphi kindly provides us with an enumerator, so we can write this:
var L:TMyList;
E:TMyObject;
begin
for E in L do ;
end;
The trouble is, I'd like to write this:
var L:TMyList;
E:TMyObject;
begin
for E in L.GetEn...