Hello, how can I find by name and get the Item in a collection of object ?
procedure TfoMain.InitForm;
begin
// Liste des produits de la pharmacie 1
FListeDispoProduit := TListeDispoProduit.Create(TProduit);
with (FListeDispoProduit) do
begin
with TProduit(Add) do
begin
Name := ...
helos,
on WinXP my application has been sucessfully using a global mousehook to retrieve mouseposition and clicks even if it does not have the focus. the hook is in a separate .dll and is being initialized like this (in delphi):
SetWindowsHookEx(WH_MOUSE, @MouseHookCB, HInstance , 0);
now on Win7 this basically also works during runt...
For a registration code I want to convert an Int64 to base30 (30 so that only uppercase characters and excluding 0,O,I,1,etc.) and back.
This is not too difficult using functions like:
const
Base = 30;
Base30CharSet = '23456789ABCDEFGHJKLMNPRSTVWXYZ';
function ConvertIntToBase30(ANumber: Int64): string;
begin
if(ANumber = 0) the...
Hello there.
I've gotten a CSV file supposedly with seven columns, and I was doing just fine until recently, they started using commas inside the third data column, and also CR and LF characters, also inside the third column, all of this between double quotes.
I was reading it line by line, so I could cross-check it with another file, ...
The Delphi complier often uses a *.Dll when a special delivery of code info is required to the complier/editor:- example bourland.dll is the memory manager for the Delphi complier, as I remember. And their are many other *.dll's that Embarcoo keep secret that do other things. Is their anything you know that is public information on this ...
Hi.
I want to make a string grid to display some kind of vertical cursor to highlight the current selected column. So, in MouseDown I call setCurPos, then I call InvalidateCol to invalidate current column. This calls the DrawCell. DrawCell paints the cursor on current column.
The problem is this: if I have more rows in grid then it can...
Possible Duplicate:
Comprehensive list of Delphi IDE Shortcuts
What are the Common useful shortcut in delphi2009? can we create also our own?
...
Background: I am using OmniThreadLibrary to load batch mode ADO stored procedures in the background. I am doing some slightly dodgy stuff by swapping the connection after opening the SP but that seems to be quite reliable. I'm using PostMessage to send messages back to the calling form and that works in my test applications. Primoz' comm...
I would like to start studying the .wav specimen by compairing two files. like returning a result of duration, accent, pronounciation in percentage. etc. or any code that comparing/analyzing the .wav
...
Is there a API or registry key which I can use from applications (native, Java or .Net) to check if the currently logged on user has configured a default printer?
Update: Many thanks for the answers so far! According to the KB article http://support.microsoft.com/kb/156212, the registry entry (read/write) is only documented up to Window...
Hi,
I tried to use a TListView component to display rather large data lists (like 4000 rows large), and creating the list is incredibly slow - it takes something like 2-3 secs, which makes the UI all laggy and close to unusable.
I fill the TListView.Items inside a BeginUpdate/EndUpdate block, with only preallocated strings - I mean : I...
I just discovered that the caps lock and shift key (and probably some more of the keys) affect all of the keyboards connected to the computer. (one of the hazards of testing a program that I coded, I only have two hands so it took me ages to realize a problem like this)
So separating the keystrokes is fine, but the shift/caps locks drive...
Hi , Can i use IdHTTP in the OnExecute Event (Indy) ? like this :
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
H: TIdHTTP;
Data, Res: string;
begin
Data := AContext.Connection.IOHandler.ReadLn();
H := TIdHTTP.Create(nil);
try
Res := H.Get(Data);
finally
H.Free;
end;
AContext.Connection.IOHandle...
Hi,
I want to draw the themed border of a TEdit in a Paintbox. The code must be functional under Windows Vista and 7. I have tried the following. It works only under Windows XP.
var
Details: TThemedElementDetails; //uses Themes
begin
if ThemeServices.ThemesEnabled then
begin
Details := ThemeServices.GetElementDetails(teEdit...
Hello all,
I'm trying the achieve the following (using Delphi7):
After logging in to my program, the user gains control, but in the background a separate thread downloads a file from the Internet to check if the current license key is blacklisted. If it is, the user receives a prompt and the program terminates.
So I've created a separa...
I have a number of Typed TLists which I am having problems getting to sort
Normally, for an untyped TList, I would have a function such as:
function SortByJob(Item1: Pointer; Item2: Pointer): Integer;
var
p1, p2: JobPointer;
begin
p1 := JobPointer(Item1);
p2 := JobPointer(Item2);
if p1.job > p2.job then
Result := 1
...
I'm using a record composed of strings, booleans, integers, currencies and arrays of other records inside a method of a class. I would like to recursively initialize all fields of a primitive type to empty/false/zero. Delphi doesn't appear to do this by default. Is there a straightforward way to accomplish this that doesn't involve acces...
Problem
If the text in TRichEdit is something like this;
'hello, world'#$D#$A
Then the following routine displays TRUE. However when the RichEdit has
'test'#$D#$A#$D#$A'test'#$D#$A#$D#$A'test'#$D#$A
Then the routine displays FALSE. It seems to me to be flawed as it is finding the comma's but not the newlines/linefeeds. I created ...
Hi there,
I'm looking for a way to write GeoTIFF files in Delphi. If possible, I would like to write DEFLATE-compressed GeoTIFFs. Any hints on where to start?
Thanks for your insight :)
...
Hi,
I want to send a broadcast UDP message in my LAN, the application is client/server.
I desire to update the user interface, this way any computer send a message to update the others.
Can I use UDPServer indy, how to use ?
Thanks
...