I have an abstract class:
type
TInterfaceMethod = class abstract
public
destructor Destroy; virtual; abstract;
function GetBasePlan: Word; virtual; abstract;
procedure CountBasePlan; virtual; abstract;
procedure Calculate; virtual; abstract;
procedure PrepareForWork; virtual; abstract;
end;
...
I'm perplexed. At CodeRage today, Marco Cantu said that CharInSet was slow and I should try a Case statement instead. I did so in my parser and then checked with AQTime what the speedup was. I found the Case statement to be much slower.
4,894,539 executions of:
while not CharInSet (P^, [' ', #10,#13, #0]) do inc(P);
was timed at 0...
I have a product's dataset and I want to have distinct bands for each type of product, something like, if the product is a fruit, print it's weight, if the product is a car print its color and so on.
And I want to let my users customize it, so each band for each type o product will be perfect.
My DataSet have all fields from all type o...
Which component to use to play mp3 files from streams/files and also to know the lenght in seconds of that mp3 stream?
...
Someone just sent me a decompile of a program into C. It was a very good decompile, producing nice, mostly readabe C code (if you overlook the fact that none of the variables or functions had a human-readable name) that mostly looked like it would actually compile.
There was one big problem, though. I happen to know that the program h...
I have a DBGrid on a form. The DBGrid has many columns, so an horizontal scroller is displayed. I scroll the DBGrid view to the right to see more columns. If I select a row, the DBGrid view is automatically reset to view the first column (As if I scroll back to the left most position).
Is there a way to prevent that?
...
We need to validate an user on Microsoft's Active Directory using Delphi 7, what is the best way to do that?
We can have two scenarios: the user inputs its network username and password, where the username may include the domain, and we check on active directory if it is a valid, active user. Or we get the current logged user from Windo...
I'm trying to write a TCustomDBGrid descendant that's designed to feel like a TListBox. One of the things I want to change is the Options property's defaults. TCustomDBGrid defines Options as:
property Options: TDBGridOptions read FOptions write SetOptions
default [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines,
dgRo...
Is there any possibility that GetPropInfo returns nil even if the given class is declared with correct {$METHODINFO} directives.
type
...
...
{$METHODINFO ON}
TMyClass = class
private
fField: integer;
published
property Field: integer read fField write fField;
end;
{$METHODINFO OFF}
...
.....
Does anyone know of a short cut to place my name and the date where the cursor is i.e.
//021208 DarkAxi0m
so i don't keep check what the date is when i'm adding comments.
Im using Delphi7, with CnPack And GExperts Installed.
I think it should be able to be done with one of those experts.
...
I have a Delphi application similar to Taskbar Shuffle that includes a hook dll.
EDIT: This hook DLL communicates with the main app by sending windows messages.
I want to add support to XP and Vista x64 and my initial idea was to convert the dll to 64-bit (compiling it with FreePascal) but keep the application 32-bit for now (Delphi).
...
I work on a program in Delphi that holds a lot of data, and I wonder which method is the best to save it to file. Now we use records and "file of" to save it but I think it should be better methods. I would prefer a system that makes it easy to migrate from the system we use now.
EDIT: The application is a sort of a database application...
Hi.
This works:
constructor TMyObj.Create;
begin
inherited;
end;
Why this is not working also?
function TMyObjEx.Import(CONST FileName: string; CONST x, y, z: Integer): string;
begin
result:= inherited; // Import(FileName, x, y, z); <--- Compiler says: "incompatible types"
//do other stuff here
end;
Declaration of TMyObjEx is...
I'm curious about what it takes to program for mobile devices (Windows Mobile 6.1) and if I can use the IDE's we're already used to (RAD Studio 2009).
Is there a Mobile Development Community around where Delphi or C++Builder users can learn from?
Are there differences in development techniques, like: Drivers, Memory Limits, Device ...
IntToStr() function returns string which is Unicode now.
I want converting to AnsiString.
Can I use AnsiString(IntToStr(I)) safely?
...
I'm using the Win32 CreateProcess function to perform a call to an external executable. The executable returns a string.
Is there a way I can capture and interrogate the returned string after calling the executable? Failing that, I might have to write out the string to a file in the executable and read that in the calling program afte...
hi
I am not a Delphi programmer, but I I got an old Delphi 7 application that I need to fix and it is using ADO.
The database table (MS Accesss) contains +100,000 rows and when I set the ADOTable.Active=true it starts to load the entire table into RAM and that takes a lot of memory and time.
How can I prevent ADO to load the entire ta...
I'm using Turbo Delphi 2006.
The DLL will be called from within Excel as part of a VBA/DLL combination.
The first part of the problem is trying to find out how to pass to the DLL a reference to the current Excel session. Most other code I've seen has you launching a separate instance of Excel apart from the one you're in.
I've seen s...
Hi
I have a Delphi 7 app using ADO/MSDASQL.1 provider and I wonder if it is possible to "log" the SQL queries sent to the DB in a easy way? Just like the SQL profiler in SQL Server?
//Andy
...
Hi
I use nested database stuctures with TClientDataSets. I'm new to programming so my lingo is ten-to-one wrong.
My problem is as follows: I defined my database stucture and all the fields of the nested stuctures and then I called the CreatDataSet method of the master clientDataSet and it worked. I then wanted to add another data fiel...