i have a routine that searches files:
procedure RecSearch(const sPathName, sFile : String; const subDir : Boolean);
var
sr : TSearchRec;
sPath : String;
begin
Application.ProcessMessages;
sPath:=IncludeTrailingBackslash(sPathName);
if FindFirst(sPath + sFile, faAnyFile - faDirectory, sr) = 0 then
repeat
lstBox...
Hi,
I am using Synapse for Delphi, but when during HTTP downloads, of course, the GUI freezes. Looking at the documentation, they suggest using the OnHeartbeat method.
(See http://www.ararat.cz/synapse/doku.php/public%3Ahowto%3Aheartbeat )
Unfortunately, they don't actually give any code example, and while the concept is simple, th...
I recently downloaded the source to an "open source" project that unfortunately has dependencies on a bunch of expensive proprietary libraries, including Infopower 1stClass, which it seems to use primarily for TfcShapeButton, a component that acts like a standard TBitBtn, except that you can give it an arbitrary polygonal shape by descri...
Can someone help me fix this:
{$IFDEF UNICODE}
function FormatStringByteSize( TheSize: Cardinal ): string;
{ Return a cardinal as a string formated similar to the statusbar of Explorer }
var
Buff: string;
Count: Integer;
begin
Count := Length(Buff);
FillChar(Buff, Count, 0);
ShLwApi.StrFormatByteSize( TheSize, PWideChar(Buff),...
Delphi 2009 and above support unicode. I have few legacy pascal source files that I wish to make it compile in Delphi 2009/2010 as well as Delphi 2007 and below.
A quick and safe way is replace
String to AnsiString
PChar to PAnsiChar
Char to AnsiChar
Is there any utility available that able to parse .pas file and make such replacem...
Hi everyone !
I'm stuck with calling an external DLL and passing a function (pointer) as parameter.
I've recently had different problem of passing some arguments to DLL and you helped.
Hope, someone know how to do this as well....
Here's function declaration in DLL (cpp) that needs to be called from Delphi:
typedef void (*PTR_Alloca...
It is possible to work with a Delphi 5 project in the Delphi 2009 IDE by referencing the Delphi 5 version of dcc32?
If so are there any issues to watch out for concerning the way that project settings (search paths, conditional defines etc.) are implemented in 2009?
Edit: Just to clarify I am also upgrading the project to Unicode but w...
hi all
I want to write an app that is an address book and uses a access .mdb file. I know how to insert a new contact into the database, but i do't know how to edit a contact. I put my test project in here AddressBookTest.zip. Any help is welcomed
...
Is there a way to instruct DCC32 to use the same library path that is used by the IDE (i.e. in Tools/Options/Environment Options/Delphi Options/Library - Win32)?
For obvious reasons, I do not want to maintain two lists of directories (one in a cfg file, one in the Delphi IDE).
...
If I launch the RAD Studio command prompt and run
msbuild /t:Rebuild
in a project directory, msbuild will show the full command line to invoke dcc32, including all path settings.
Which kind of magic does MSBuild use to find the search paths, based on the IDE settings (stored in the registry) and the project file (which contains pla...
i need to get the value of the selected cell of a DBGrid in Delphi
(i have no idea how to do it, i tryed dbGrid's OnMouseMove
pt : TGridCoord;
...
pt:=dbGrid.MouseCoord(x, y);
)
[Edited]
I can use the OnCellClick to get the value of the cell with "Column.Field.AsString", but i want to get the value from the first column when i click on...
Some days ago I posted a question on which component to use to make a MultiDatabaseWithJustOneComponent and i follow the general advice to use dbexpress.
FirebirdSQL has date field, SQL Server 2008 has date fields too. But for some reason date fields are converted to TWideStringField, and when I'm trully confident that I've seen all e...
Previously I have used Visual AssistX in Visual Studio and it had a very nice spell checking over literals.
Is there something similar to Visual Assist spell checker present for Delphi as expert?
It should spell check method names, class names and especially resourcestrings and literals.
...
I wish to be able to declare a Data Snap method with the following signature
type
TLoginInfo = record
Username: string;
Password: string;
LastLogged: DateTime;
end;
function GetLoginInfo(const UserId: Integer): TLoginInfo;
When I try to call it it says that TLoginInfo is not well known.
...
I know in D2010 they have added support for static constructors and destructors.
Where I can find more information about they: syntax and samples?
...
Hello, I am trying to make HTTP Requests from Delphi using the WinInet functions.
So far I have:
function request:string;
var
hNet,hURL,hRequest: HINTERNET;
begin
hNet := InternetOpen(PChar('User Agent'),INTERNET_OPEN_TYPE_PRECONFIG or INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
if Assigned(hNet) then
begin
try
hURL := I...
what i have works, but im looking if there is a faster way to copy a string into a pByteArray
from sysutils
PByteArray = ^TByteArray;
TByteArray = array[0..32767] of Byte;
assume a and s are setup correctly
a: pByteArray;
s: string;
is there a fast way to do this, ie something like copy
for i := 1 TO Length(s) - 1 do
...
In Delphi 2010 a new Find bar has been added beneath the source editor.
Though I sounds like a good idea I find it prettry anoying when F3 should be pressed multiple times for finding next matches. It works from time to time for me.
How I can switch it off and use the old search fnctionality?
...
Possible Duplicate:
GetStackTrace in Delphi 7?
Does anyone know how to get a nice friendly stack trace into a string when an exception is raised in Delphi 6?
...
Hello could someone please help me with the following:
I want to center the text in a scalc open office spreadsheet cell via Delphi and the OOoTools toolkit.
The following code does not work:
sRange := '$A$3:$A$3';
ooParams := CreateUnoStruct('com.sun.star.beans.PropertyValue', 1);
ooParams[0].Name := 'ToPoint';
ooParams[0].Value := s...