Delphi

“Cannot create a method for an unnamed component”

回眸只為那壹抹淺笑 提交于 2020-01-22 14:28:03
问题 The following code (when registered in a package) gives us a component called TParentComponent registered in the pallet Test . However, when you create a Child object using the Property Editor (provided in the same code), the IDE displays the error message Cannot create a method for an unnamed component. What's strange is that the Child object does indeed have a name. Here's the source: unit TestEditorUnit; interface uses Classes, DesignEditors, DesignIntf; type TParentComponent = class;

Preferable way to write Delphi database apps with transactions & data-aware components

匆匆过客 提交于 2020-01-22 14:04:17
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

Preferable way to write Delphi database apps with transactions & data-aware components

大城市里の小女人 提交于 2020-01-22 14:02:51
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

How to Pass an Object Method as a Parameter in Delphi, and then Call It?

给你一囗甜甜゛ 提交于 2020-01-22 13:26:49
问题 I fear this is probably a bit of a dummy question, but it has me pretty stumped. I'm looking for the simplest way possible to pass a method of an object into a procedure, so that the procedure can call the object's method (e.g. after a timeout, or maybe in a different thread). So basically I want to: Capture a reference to an object's method. Pass that reference to a procedure. Using that reference, call the object's method from the procedure. I figure I could achieve the same effect using

How to Pass an Object Method as a Parameter in Delphi, and then Call It?

五迷三道 提交于 2020-01-22 13:26:13
问题 I fear this is probably a bit of a dummy question, but it has me pretty stumped. I'm looking for the simplest way possible to pass a method of an object into a procedure, so that the procedure can call the object's method (e.g. after a timeout, or maybe in a different thread). So basically I want to: Capture a reference to an object's method. Pass that reference to a procedure. Using that reference, call the object's method from the procedure. I figure I could achieve the same effect using

IP Address String Routines in Delphi?

被刻印的时光 ゝ 提交于 2020-01-22 12:58:11
问题 I'm looking for a way in Delphi to validate and manipulate IP Addresses. Some of the things it should be able to do is... Verify that a string is a valid IP address Verify that a string is a valid subnet mask Verify that an IP address is within a given Subnet Some type (record or string or whatever) which is meant for storing an IP address Basic conversion of an IP address types, such as String or Array[0..3] of Byte Any other IP address routines that can make IP manipulation easier The basic

Capture Console in Delphi 2009 and above

妖精的绣舞 提交于 2020-01-22 12:56:33
问题 The code below works for Delphi XE, but the 2400 buffersize is pretty ugly. Anyone have some suggestions on cleaning this routine up ?? And making the 2400 limit disappear (without defining a 64000 buffer). Thanks procedure TForm1.Button1Click(Sender: TObject); begin CaptureConsoleOutput('c:\windows\system32\ipconfig','',Memo1); end; procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; AMemo: TMemo); const CReadBuffer = 2400; var saSecurity: TSecurityAttributes; hRead:

Delphi buttons show white border on Aero glass

血红的双手。 提交于 2020-01-22 09:32:05
问题 I have been trying to find a good-looking design using Aero in Delphi 2010. One of the obvious uses one sees, is where the glass frame is extended to include the OK/Cancel buttons at the bottom of the screen. I notice though that this doesn't look quite right in Delphi 2010 - there is a white border all around each button. This image shows the problem: the top 3 buttons are from my app, the bottom two were taken from Paint.NET's Layer Properties dialog. I tried various combinations of

How to define private base Application messages?

早过忘川 提交于 2020-01-22 08:54:04
问题 I'm was using private messages in my application for year like this: UM_APP_BASE = WM_APP; // WM_APP is declared as WM_APP = $8000; in "Controls" unit. and then defined my private messages: UM_EXPLORER_MSG = UM_APP_BASE + 1; UM_LICENSE_CHANGE_MSG = UM_APP_BASE + 2; etc... And use them like this in my class: procedure UMLicenseChanged(var Message: TMessage); message UM_LICENSE_CHANGE_MSG; (I also use RegisterWindowMessage to "talk" to my other applications but that is a different story) I don

Winsoft Optical Barcode Recognition-SEO狼术

梦想的初衷 提交于 2020-01-22 03:57:24
  Winsoft Optical Barcode Recognition v4.1 for Delphi & C++ Builder 5 - 10.3 FULL SOURCE   用于Delphi和C ++ Builder 5的Winsoft光学条形码识别v4.1-10.3完整源代码   Delphi和C ++ Builder光学条形码识别组件。   使用ZBar条形码阅读器库   支持EAN-13 / UPC-A,EAN-8,UPC-E,Code 39,Code 93,Code 128,Codabar,PDF417,GS1 DataBar,GS1 DataBar Expanded,Interleaved 2 of 5,SQ Code和QR Code条码   支持Windows 32和Windows 64   适用于Delphi / C ++ Builder 5-10.3和Lazarus 2.0.6   注册版本中包含的源代码   应用程序中的免版税分配   Delphi and C++ Builder optical barcode recognition component.   uses ZBar bar code reader library   supports EAN-13/UPC-A, EAN-8, UPC-E, Code 39, Code 93, Code 128