I have a program that does a limited form of multithreading. It is written in Delphi, and uses libmysql.dll (the C API) to access a MySQL server. The program must process a long list of records, taking ~0.1s per record. Think of it as one big loop. All database access is done by worker threads which either prefetch the next records o...
i have use delphi xe recently but exe size is very big because of rtti(i think)
howto remove rtti , and can i make my application size as small as delphi 2009 application(490 kb) without comprssion; and what is the use of rtti
...
If I open mentioned url in IE, it works. But if I open same url by api “InternetOpenUrl” then it returns nil.
url is
http://gisservices.datadoors.net/wmsc/__streaminguid.44d023f0-447c-4378-9624-858cd90bb045/wms-c.ashx?SERVICE=WMS&STYLES=&BBOX=-8734904.9955321327,4935096.5230968799,-8659096.1018777788,5002463.5331088305&WIDT...
As stated in many places in SO "hardware/software is cheap, people is expensive".
Tools, like the ones listed here can really make a difference. Now I am stepping out of the cave and I am realizing that i must update myself.
I started studying "theory", I have a busy schedule for reading books on Refactoring, UnitTest, OOP Patterns. Bu...
Hi, I have this piece of code:
SELDR_WH := FindControl(FindWindow(nil,'PhoneDB Filtering')) as TForm;
if seldr_wh <> nil then
begin
SELDR_WH.ClientHeight := SELDR_WH.ClientHeight + 20;
gif := TGIFImage.Create;
with gif do begin
Parent := SELDR_WH;
Top := SELDR_WH.ClientHeight - 20;
Left := 30;
try
...
I would like to have my own caption bar and therefore I am using basically a panel (Name: pnCaption) and remove the original caption bar in CreateParams. But the ability to move the window by MouseDown-MouseMove in the new panel is a problem.
Normally you would use the NCHITTEST message. BUT this isn't signaled if the mouse is over the ...
I've created a design package with component registration (component itself is in run-time) and some IDE menu items.
If I click on "Install" menu item in context menu from Project manager - package will be loadeded and works normally (always).
If I close IDE and restart it - package may be loaded or may not be loaded. Seeming randomly....
I have a function that takes in a pointer to a series of char.
I wish to copy 256 chars from that point, and place them in a string.
msg is not null-terminated.
The below code seems to give me some problem.
Is there a correct way to do this?
Init( msg: PCHAR)
var
myStr: String;
begin
for i:= 1 to 256 do
begin
myStr[i] := msg[i-1]...
Hi,
I would like to use a float property in my component, but set it to some non-zero default value (let's say it is 1000.0). If I try to do this in the Create, the property start to behave wildly since the default value for floats it 0 (see classes.TWriter.WriteProperty.WriteFloatProp.IsDefaultValue) so when I override some value with ...
I found Power++ and to my suprise it looks like a good alternative for Delphi and Visual Studio. Anyone used it? Can you tell me if it is worth it buying/learning it?
...
How can i simulate an OnDestroy event for a TFrame in Delphi?
i nievely added a constructor and destructor to my frame, thinking that is what TForm does:
TframeEditCustomer = class(TFrame)
...
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
...
end;
constructor TframeEditCustomer.Creat...
Suddenly InvalidateRow and InvalidateColum are not working anymore for my TStringGrid. I think happen about 7 days ago, but only today I realized that it is actually happens. I haven't installed any 3rd party controls in these 7 days. InvalidateGrid works. In some circumstances (it seems to be random) InvalidateRow and InvalidateColum se...
Hello!
I learned yesterday that in DelphiXE using the compiler directive:
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
you can access/use 4GB address space on 64bit computers even though DelphiXE compiler produces a 32bit code.
I tried today DelphiXE program on 4GB machine with Windows7 and after starting the program
I really get t...
I've a TListBox on a Windows form with 966 elements in it. When I click a button on my form, a subset of these strings are selected (roughly 200 of them).
If I now unfocus my application by clicking somewhere on the task bar, the entries from my TListBox bleed upward, so as they are visible above the boundaries of the TListBox. They a...
I need to know when the row/column property of a grid was changed in order to do some processing.
In TStringGrid Row property is
property Row: Longint read FCurrent.Y write SetRow;
But, unfortunately I cannot override the SetRow as it is private. SelectCell is not private BUT it is called BEFORE the new column and row attribute is...
Is it possible to detect if any sound plays on a windows xp machine? Help in any language would be useful. I basically need to write a program that runs all the time and outputs some text to a file whenever a sound plays. I don't need any specific information about the sound, just whether a sound is playing. I don't care whether the ...
actually i am using late-binding in delphi, and i need to know wich is the proper way to work with it.
My principal concern is about how I handle the memory used by these objects, I must free the memory?
check this sample code
var
chEaten: Integer;
BindCtx: IBindCtx;
Moniker: IMoniker;
MyObject:: IDispatch;
begin
try
Ol...
G'Day,
I want to use the Windows API Postmessage() call from inside a MySQL UDF on MySQL 5.1.51 (XP SP3). I know the UDF (Written in Delphi 2006) is working by setting a bogus result for the UDF.
The syntax of the UDF takes two integer params, one for a window handle and the other for a message number. However a call to PostMessage() ...
G'Day,
Is anyone able to provide some pointers on how I can notify my Delphi application that a particular record in my MySQL database has changed? Something along the lines of the event system from Interbase?
Ideas I have looked at:
.: Q4M :. (http://q4m.31tools.com/)
Pros: Native MySQL solution requiring no external daemons
Cons: N...
I have a dynamic array myArr. What is stored in the memory in myArr when we use SetLength on it? Is it '00'? Or undefined?
SetLength allocates 16 bytes of memory for myArr in this case.
myArr : array of byte;
SetLength(myArr, 16);
...