delphi-2009

Strange WM_CHAR behaviour (wrong chCharCode)

时光怂恿深爱的人放手 提交于 2020-01-03 02:48:27
问题 I need to automate entering a certain character (Russian letter Э ). In Spy++ the corresponding message looks like this: WM_CHAR chCharCode: '221' (221) cRepeat:1 ScanCode:28 fExtended:0 fAltDown:0 fRepeat:0 fUp:0 In order to send this message programmatically, I use this Delphi code: SendMessage(Self.PassengerGrid, WM_CHAR, WPARAM(221), LPARAM($280001)); When I examine the results of running my code in Spy++, I see following message: WM_CHAR chCharCode: '89' (89) cRepeat:1 ScanCode:28

How can I detect if a Delphi class has a virtual constructor?

亡梦爱人 提交于 2020-01-02 18:06:28
问题 For example, is there a way to find out that this class has a virtual constructor (at runtime)? TMyClass = class(TObject) MyStrings: TStrings; constructor Create; virtual; end; For example, in this code I would like to test if the class referenced by Clazz has a virtual constructor: procedure Test; var Clazz: TClass; Instance: TObject; begin Clazz := TMyClass; Instance := Clazz.Create; end; Is there a simple solution, for example using RTTI, which works in Delphi 6 to 2009? 回答1: Looking

How can I detect if a Delphi class has a virtual constructor?

淺唱寂寞╮ 提交于 2020-01-02 18:05:39
问题 For example, is there a way to find out that this class has a virtual constructor (at runtime)? TMyClass = class(TObject) MyStrings: TStrings; constructor Create; virtual; end; For example, in this code I would like to test if the class referenced by Clazz has a virtual constructor: procedure Test; var Clazz: TClass; Instance: TObject; begin Clazz := TMyClass; Instance := Clazz.Create; end; Is there a simple solution, for example using RTTI, which works in Delphi 6 to 2009? 回答1: Looking

Forcing a non blocking temporary hint window in Delphi

萝らか妹 提交于 2020-01-01 11:39:13
问题 I've been searching, but cannot find a solution so I figured perhaps I should simply post it. Here's what I'd like to do, in Delphi (2009): At a certain moment in my application, I'd like to show a message to the user. This should be the normal hint window, which automatically disappears after the normal application defined hint pause, with a custom message (and have it automatically sized etc etc). This should be non blocking, like a normal hint, not dependent on the current control or

ADO Connection Timeout problem

让人想犯罪 __ 提交于 2019-12-31 03:11:14
问题 Using TADOConnection class to connect to SQL server 2005 db. Having ConnectionTimeOut := 5; // seconds. Trying to open the connection synchronously. When the server is available and running, the connection time out works fine. If the server is not available or network connection is lost, then attempting to open a connection waits for more than 5 seconds (may be 20 secs). Is there any property or method that needs to be set to influence this behavior? 回答1: No, it's enough to set the

External Exception EEFFACE in Delphi

自作多情 提交于 2019-12-30 07:54:06
问题 While debugging my application with Delphi 2009, I sometimes get the following exception occurring: (source: beholdgenealogy.com) This only happens occasionally, but after pressing OK, then my IDE and program both may freeze. If I am lucky I can sometimes do a File/SaveAll in Delphi, but sometimes I can't. Either way I am stuck and then the only thing I can do is use Windows Task Manager to shut down Delphi. Of course, if I was unable to SaveAll, then I lose all the edits I had made since

Delphi 2010 Cryptography libraries [closed]

心不动则不痛 提交于 2019-12-30 04:47:08
问题 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 3 years ago . can you recommend an open source Delphi crypto library that works with Delphi 2006, Delphi 2009 & Delphi 2010 Algorithms need : DES, MD5, SHA-1 回答1: Here is a short list of the libraries I have used both pre and post D2009: TPLockbox (I use an unofficial updated version. Although there is a recent official(?)

ZeroConf/Bonjour Code that works in Delphi 7 not working in 2009

为君一笑 提交于 2019-12-29 07:52:20
问题 I have the following declaration for DNSServiceRegister: function DNSServiceRegister ( var sdRef: TDNSServiceRef; const flags: TDNSServiceFlags; const interfaceIndex: uint32_t; const name: PUTF8String; //* may be NULL */ const regType: PUTF8String; const domain: PUTF8String; //* may be NULL */ const host: PUTF8String; //* may be NULL */ const port: uint16_t; const txtLen: uint16_t; const txtRecord: Pointer; //* may be NULL */ const callBack: TDNSServiceRegisterReply; //* may be NULL */ const

Why is DoubleBuffered disabled by default?

落爺英雄遲暮 提交于 2019-12-29 05:02:31
问题 After creating a new form, I usually perform this ritual: Change the name into something meaningful; Type a Caption ; Change the position property (DefaultPosOnly is hardly ever what users expect); Set ShowHint to true ; Set DoubleBuffered to true ; I've been wondering for a while why the default value is 'False'. To me it just looks low-tech and crappy, and on my new machine I don't notice any difference in performance. Is doublebuffering problematic on older machines, VNC, Remote Desktop or

first chance exception: system error 8: not enough storage space to perform the command

﹥>﹥吖頭↗ 提交于 2019-12-25 13:01:15
问题 how do i debug something like this? i need the debugger to stop and show me where the problem is. don't just show it in the event log & then hang. first chance exception: system error 8: not enough storage space to perform the command i'm using delphi 2009. the problem doesn't happen regulary. i'm not eager to pepper my program with OutputDebugString calls to track this down! thank you for your help! 回答1: You are looking at a resource leak on your server, more than likely... Either handle