delphi-5

Undeclared Identifier errors related to DateSeparator and LongTimeFormat [duplicate]

╄→гoц情女王★ 提交于 2020-06-16 07:26:29
问题 This question already has answers here : DecimalSeparator in SysUtils and System.SysUtils (2 answers) Closed 5 years ago . I have a program that was created in Delphi 5 and the program still runs nearly perfect on Win7 and Win8. However, when trying to run this code in XE6 (trial version) I get two errors that I am having trouble fixing. Errors are with 'DateSeparator' and 'LongTimeFormat' with each having the error "undeclared identifier" The code segment is as follows: function

Undeclared Identifier errors related to DateSeparator and LongTimeFormat [duplicate]

ε祈祈猫儿з 提交于 2020-06-16 07:24:41
问题 This question already has answers here : DecimalSeparator in SysUtils and System.SysUtils (2 answers) Closed 5 years ago . I have a program that was created in Delphi 5 and the program still runs nearly perfect on Win7 and Win8. However, when trying to run this code in XE6 (trial version) I get two errors that I am having trouble fixing. Errors are with 'DateSeparator' and 'LongTimeFormat' with each having the error "undeclared identifier" The code segment is as follows: function

Using .AsString or .Text?

寵の児 提交于 2020-01-14 07:34:08
问题 I have just seen a bit of code (D5) where they used... aStr:=tblAcct.FieldByName('Name').Text; It seems to work fine but I have always used... aStr:=tblAcct.FieldByName('Name').AsString; I have used both when loading a TMemo and again there seems no difference. aMemo.Lines.Text:=tblAcct.FieldByName('History').Text; aMemo.Lines.Text:=tblAcct.FieldByName('History').AsString; Is there a reason why I should use one over the other? If so, which one? Actually for TMemo, I usually use... aMemo.Lines

Can Delphi only use a .dll if required?

烈酒焚心 提交于 2020-01-10 03:59:25
问题 I have added these two methods to the 1st unit of my Delphi 5 application. function Inp(PortAddress: Integer): Integer; stdcall; external 'inpout32.dll' name 'Inp32'; procedure Output(PortAddress, Value: Integer); stdcall; external 'inpout32.dll' name 'Out32'; However I don't want to have to issue the inpout32 library with the software unless they explicitly need it. Currently the program says "Not Found" upon executing unless they're present in the root or System32. Users will only call

EnumerateTraceGuids returns “The parameter is incorrect” (87)

懵懂的女人 提交于 2020-01-03 15:42:20
问题 i am trying to call the Windows API function EnumerateTraceGuids: ULONG EnumerateTraceGuids( __inout PTRACE_GUID_PROPERTIES *GuidPropertiesArray, __in ULONG PropertyArrayCount, __out PULONG GuidCount ); Starting from the code sample on MSDN: ULONG status = ERROR_SUCCESS; PTRACE_GUID_PROPERTIES *pProviders = NULL; ULONG RegisteredProviderCount = 0; ULONG ProviderCount = 0; pProviders = (PTRACE_GUID_PROPERTIES *) malloc(sizeof(PTRACE_GUID_PROPERTIES)); status = EnumerateTraceGuids(pProviders,

Why is Fast Report VCL in Delphi raising a stack overflow exception when editing a variable?

半世苍凉 提交于 2020-01-03 05:32:26
问题 I am using Delphi 5 and Fast Report 4 to make a report application. I have defined a variable "ReportTitle" in MyReport.f3 at design time and I assigned a value for it at runtime. Why is my code raising an EStackOverflow Exception? Here is the code sample frxrprt1.LoadFromFile('c:\MyReport.fr3'); frxrprt1.Variables['ReportTitle'] := 'Sales Summary Report'; frxrprt1.ShowReport; 回答1: Use this: frxrprt1.Variables['ReportTitle'] := '''Sales Summary Report'''; The "variable" values are actually

How to simulate an OnDestroy event on a TFrame in Delphi?

两盒软妹~` 提交于 2019-12-31 17:55:50
问题 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.Create(AOwner: TComponent) begin inherited Create(AOwner); //allocate stuff end; destructor TframeEditCustomer.Destroy; begin //cleanup stuff inherited Destroy; end; The problem

Delphi: At runtime find classes that descend from a given base class?

痴心易碎 提交于 2019-12-29 05:26:12
问题 Is there at way, at runtime, to find all classes that descend from a particular base class? For example, pretend there is a class: TLocalization = class(TObject) ... public function GetLanguageName: string; end; or pretend there is a class: TTestCase = class(TObject) ... public procedure Run; virtual; end; or pretend there is a class: TPlugIn = class(TObject) ... public procedure Execute; virtual; end; or pretend there is a class: TTheClassImInterestedIn = class(TObject) ... public procedure

Cannot find jedi within my Delphi 5 file using XE6 [closed]

旧巷老猫 提交于 2019-12-25 17:43:35
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a multi-file project that was created in Delphi5 and I am attempting to compile in Delphi XE6. In my DSPack.pas file I get the error: "'jedi.inc' could not be found..." related to the code line: {$I jedi.inc} ... there are also many, mostly "undeclared identifier", errors shown as errors - but named as

DBGrid stop current Row moving

天涯浪子 提交于 2019-12-25 03:48:23
问题 Using d5, TDBGrid, SQLite3 and ZEOS. Database has 2000 items, one Column is an "Active" as Boolean, a second Column is "ItemName" as Text, and IndexFiledNames is "ItemName' OnDblclick toggles "Active" On/Off and all works as expected for the Data . Active changes from True to False and back again. But, if I double-click on the last visible Row of the DBGrid, to toggle the Active state -- after the toggle, the DBGrid moves that item Row to the vertical center Row-position of the grid. This is