delphi-5

I need a DBGrid OnAfterCellClick

痴心易碎 提交于 2019-12-12 01:15:53
问题 I have three DBGrids and three Tables, and two of them are linked with Master Fields and work as expected. When the user clicks on grid-1, it shows three items in grid-2. When the user clicks on grid-2, I want to use Locate to select the Row in grid-3 Problem is that the grid-2 OnCellClick event is fired before the data has changed to the appropriate Row. e.g. Grid-2 Flowers <-- this has focus and Dirt has focus in grid-3 Weeds Trees <-- then I click here Grid-3 Dirt Water Gum <-- and using

access violation at address in module ntdll.dll - RtlEnterCriticalSection with TCanvas.Lock

自闭症网瘾萝莉.ら 提交于 2019-12-11 07:18:18
问题 I have a random rare AV in my application, which I cannot reproduce unfortunately. exception message : Access violation at address 76FFD968 in module 'ntdll.dll'. Write of address 00000014. main thread ($11a0): 76ffd968 +00099 ntdll.dll 76ffd872 +1b572 ntdll.dll RtlEnterCriticalSection 00470dca +0001e app.exe Graphics TCanvas.Lock 0047116b +0002f app.exe Graphics TCanvas.TryLock 00489cbd +00041 app.exe Controls FreeDeviceContexts 0048ea80 +0003c app.exe Controls TWinControl.MainWndProc

Delphi 5 Indy/ics SSL workaround?

跟風遠走 提交于 2019-12-11 07:10:47
问题 I'm getting errors like: "IndyProtocols5 does not use or support IdSSLOpenSSLHeaders.." when attempting to install Indy 9 or 10 with my Delphi5 and notice it is a problem for others. This causes the exception: "Could not load SSL library" when using IdHttp.IOHandler. The applications I have inherited include so many unsupported D5 components, upgrading to D6+ is unfortunately beyond my skillset. I want to initially use Indy for posting and downloading CSV, but potentially calling web services

Delphi: How to set the default project in a project group?

我是研究僧i 提交于 2019-12-11 03:41:53
问题 i have two projects in a project group: ProjectA ProjectB Whenever i open the ProjectGroup.bpg in Delphi, it always starts with the 2nd project as the active one: ProjectA ProjectB And every time i have to flip it to the the "real" project: ProjectA ProjectB How can i make ProjectA the default project that opens with the project group? ProjectGroup.bpg #------------------------------------------------------------------------------ VERSION = BWS.01 #--------------------------------------------

Oracle Database Connection in Delphi 5

会有一股神秘感。 提交于 2019-12-10 22:18:50
问题 I am using Delphi 5 version and I want to connect to Oracle Database. I am having TDatabase component. I don't have any idea about how to connect to database through Delphi. Please provide the steps to connect database. thanks. 回答1: The TDatabase component is part of the BDE (Borland Database Engine), which is a deprecated technology, instead try using another alternatives which supports Oracle like ADO or Zeos. For an introduction to ADO check the Embarcadero Docs. Working with ADO

Delphi “default” keyword with Record types in older Delphi versions

别来无恙 提交于 2019-12-10 04:21:21
问题 I have this code in Delphi Detours library which I'm trying to port: type TInstruction = record Archi: Byte; { CPUX32 or CPUX64 ! } AddrMode: Byte; { Address Mode } Addr: PByte; VirtualAddr: PByte; NextInst: PByte; { Pointer to the Next Instruction } OpCode: Byte; { OpCode Value } OpType: Byte; OpKind: Byte; OpTable: Byte; { tbOneByte,tbTwoByte,... } OperandFlags: Byte; Prefixes: Word; { Sets of Prf_xxx } ... end; var Inst: TInstruction; begin ... Inst := default (TInstruction); // <- Inst

DUnit: How to run tests?

核能气质少年 提交于 2019-12-10 02:56:13
问题 How do i run TestCase 's from the IDE? i created a new project, with a single, simple, form: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) private public end; var Form1: TForm1; implementation {$R *.DFM} end. Now i'll add a test case to check that pushing Button1 does what it should: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type

Imagelist with alpha blend icons loses Transparency

僤鯓⒐⒋嵵緔 提交于 2019-12-09 12:56:00
问题 Here is (more or less) a related question: Delphi - Populate an imagelist with icons at runtime 'destroys' transparency. I have tested @TOndrej answer. But it seems I need to have visual styles (XP Manifest) enabled for this to work (version 6.0 of Windows common controls will be used - which I don't want right now). I add the Icons at run-time via ExtractIconEx and ImageList_AddIcon . Apparently setting ImageList.Handle to use System Image-List handle, does not require XP Manifest. so even

IXMLHttpRequest.responseXml is empty, with no parse error, when responseText contains valid Xml

岁酱吖の 提交于 2019-12-09 11:24:56
问题 i am fetching some XML from a government web-site: http://www.bankofcanada.ca/stats/assets/rates_rss/noon/en_all.xml i am using the following, fairly simple code: var szUrl: string; http: IXMLHTTPRequest; begin szUrl := 'http://www.bankofcanada.ca/stats/assets/rates_rss/noon/en_all.xml'; http := CoXMLHTTP60.Create; http.open('GET', szUrl, False, '', ''); http.send(EmptyParam); Assert(http.Status = 200); Memo1.Lines.Add('HTTP/1.1 '+IntToStr(http.status)+' '+http.statusText); Memo1.Lines.Add

BDE, Windows 7 and UAC

别来无恙 提交于 2019-12-07 22:36:17
问题 I have a very old application written in delphi 5 running in some customers which uses the BDE. Now some users with Windows Vista and 7, had experimented some problems with the multiuser access. i' think which these problems are related to the location of the net .and .lck files. so the question is which is the proper way to confgure the BDE under Windows Vista and 7 to avoid permissions and UAC conflicts? 回答1: In addition to the above answer, you'll want to make sure that the .net and .lck