I wish to know is there a compiler directive which I can use in my code (not from the UI) to set that the compiler/linker should generate a detailed map file.
Is there something like:
{$MAPFILE DETAILED}?
I am using Delphi 2009.
...
Hi,
I need a class that is based on TPersistent (so it stores the RTTI) and includes default Interfaces handling (QueryInterface, _AddRef, _Release) ... what is the class name I'm looking for?
...
We have a few legacy applications that were written in Delphi 7. We've had a few requests over the years to support custom desktop dpi settings in these applications but we have been able to dodge the bullet up till know. Well we can't anymore.
When users set their desktops to say 120dpi some of the controls "fall off" the application o...
I would like to change a TFrame's ScrollingBar width.
I know I could change all ScrollingBars in the system by:
SystemParametersInfo(SPI_SETNONCLIENTMETRICS,....
But how do I do it for a specific WinControl?
...
I use dynamic arrays a great deal and have no problems with the SetLength and Finalize procedures.
I recently had cause to use dynamic arrays where each array element could itself contain a variable number of elements. The declaration is like this:
TScheduleArray = array of array of array [1..DaysPerWeek] of TShiftType;
The software...
I have code that launches an external application and automatically fills in a password prompt.
I want to automate the pressing of the "ENTER" key, so that the user does not have to click "OK".
How can I send the ENTER key to an external application?
Below is my code as it stands right now.
The first line to post the password to the ...
I tried the following code but it does not retrieve text from foreground window!
procedure TForm1.Button1Click(Sender: TObject);
var
title : pansichar;
s : string;
begin
GetWindowText(GetForegroundWindow(), title,GetWindowTextLength(GetForegroundWindow()) + 1);
s := title;
showmessage(s);
end;
...
I have Delphi 2007 code that looks like this:
procedure WriteString(Stream: TFileStream; var SourceBuffer: PChar; s: string);
begin
StrPCopy(SourceBuffer,s);
Stream.Write(SourceBuffer[0], StrLen(SourceBuffer));
end;
I call it like this:
var
SourceBuffer : PChar;
MyFile: TFileStream;
....
SourceBuffer := StrAlloc(1024);
MyFi...
This is my first attempt to call a .NET assembly from a Delphi 5 (Win32) native assembly. I am only familiar with C# and .NET so please bear with me.
I guess I will walk thru this layer by layer. Here is the code for the C# assembly I am attempting to execute from the Delphi 5 assembly.
using System;
using System.Collections.Generic;
us...
I'm still something of a newbie, and I know my thinking is incorrect; I just don't know where ...
Just about everything in Delphi is descended from TObject. What if everything instead descended from a TInterfaceObject that implemented some trivial interface (e.g., "INamable," with a single method that returned a class's name string)? S...
I just got a bug report for an issue that only occurs when the program is running "on a 64-bit machine." Now, Delphi doesn't produce 64-bit code, so theoretically that shouldn't matter, but apparently it does in this case. I think I have a workaround, but it will break things on 32-bit Windows, so I need some way to tell:
If I'm runn...
I have a class that implements an interface, which is made available for plugins.
The declaration of class is quite simple. There is only one instance of this class for an entire application. When the function that returns the interface is called, it calls _AddRef on the retrieved interface before passing it back as result. Unfortunately...
Hi,
WCF generates complex types as external xsd files. How can I embed these definitions into wsdl? Because Delphi WSDL importer cannot import the complex types in the xsd files.
Thank you.
...
FUNCTION SystemspartsClT.KeyFound(Key : AluCostDict.SystemspartskeyT) : BOOLEAN;
VAR v : Variant;
BEGIN
v := VarArrayCreate([0,1], VarInteger);
v[0] := Key.System;
v[1] := Key.PartType;
Sucess := t.Locate('System;PartType', v, []);
v := NULL;
Result := Sucess;
END;
I am using Delphi for Win32.
Does thi...
Hi,
I'd like to put a TComboBox in a TListView component. Any idea how I could do that ? I don't have a clue, I'm not a delphi guru x_x. Also, I can't use external components.
Any help is welcome :)
...
XML date and time are in the format
'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?
were
•'-'? yyyy is a four-or-more digit optionally negative-signed numeral that represents the year; if more than four digits, leading zeros are prohibited, and '0000' is prohibited
•the remaining '-'s are separators between parts o...
Hi,
I use
DirectoryExists (const PathName : String);
to check if a directory is reachable from a computer or not. But if the directory does not exist and the path name is a network path, i.e.
\\computer1\Data
the method takes a very long time to return.
There must be a faster way to determine that a network folder is not reachabl...
I have a table with a RTF field in it.
How can I display this in a TDBGrid so that it actually shows the rich text, and not just (FMTMEMO) in the column?
I really don't want to use a third party component for this.
Thanks!
...
Hello,
Is there any way to remove item from listbox based on it's name but not index value? I would like to remove item named "Mouse" (which index # changes all the time).
...
I created a multichilded application. The application windows (W[n]: TMyWindows) are all the same and all have an private object class instance associated with them (E: TMyObject).
The child windows generate through this objects some messages. I have created in the main application two threads which process these messages depending on th...