Delphi

Access violation when assigning a value to my component Bitmap property [closed]

南笙酒味 提交于 2020-01-22 03:12:06
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I'm trying to create a component that must use a Bitmap, I'm having a problem when I go to select the image on the property. Here is an excerpt of the code: Property Declaration Property StarOff: TBitmap read

How to catch a moment when the external editor of TOLEContainer has been closed?

你。 提交于 2020-01-22 02:03:52
问题 Borland Developer Studio 2006, Delphi: I have a TOLEContainer object with AllowInPlace=False. When the external editor is closed and changed my OLE object I have to do something with this OLE object inside TOLeContainer. The problem is I can't catch a moment when the external editor is closed. OnDeactivate event is not working. Probably I should change the source code of TOLEContainer adding this event myself, but I don't know where is the best place for it. Can you advice some method? 回答1: A

How to catch a moment when the external editor of TOLEContainer has been closed?

时间秒杀一切 提交于 2020-01-22 02:03:21
问题 Borland Developer Studio 2006, Delphi: I have a TOLEContainer object with AllowInPlace=False. When the external editor is closed and changed my OLE object I have to do something with this OLE object inside TOLeContainer. The problem is I can't catch a moment when the external editor is closed. OnDeactivate event is not working. Probably I should change the source code of TOLEContainer adding this event myself, but I don't know where is the best place for it. Can you advice some method? 回答1: A

Trying to call ShellExecute to run Mysql and a sql script

安稳与你 提交于 2020-01-22 00:26:04
问题 I've been trying to use ShellExecute from within a Delphi app to open Mysql and run a script. ShellExecute(Handle, 'open', PWideChar(InpCommandProgram.text), PWideChar(commandline), nil, SW_SHOWNORMAL); InpCommandProgram.text = 'MYSQL' commandline = '--user=root --password=password < C:/directory/filename.sql ' filename.sql has been stripped down to 'Create databasename'. A command window opens briefly and scrolls some messages - too fast to read. If I open a command window and enter the same

Winsoft ComPort for Android Prolific-SEO狼术

余生长醉 提交于 2020-01-22 00:17:37
  Winsoft ComPort for Android Prolific v2.9 for Delphi & C++ Builder XE6 - 10.3 FULL SOURCE   适用于Android Prolific v2.9的Winsoft ComPort for Delphi和C ++ Builder XE6-10.3完整源代码   适用于Android的Prolific设备的Delphi和C ++ Builder串行通信库。   使用Prolific PL2303库   无需特殊的root访问权限   可用于Delphi / C ++ Builder XE6-10.3   注册版本中包含的源代码   应用程序中的免版税分配   Delphi and C++ Builder serial communication library for Prolific devices for Android.   uses Prolific PL2303 library   no special root access privileges needed   available for Delphi/C++ Builder XE6 - 10.3   source code included in registered version   royalty free

Winsoft ComPort for Android Prolific-SEO狼术

烂漫一生 提交于 2020-01-21 23:55:45
  Winsoft ComPort for Android Prolific v2.9 for Delphi & C++ Builder XE6 - 10.3 FULL SOURCE   适用于Android Prolific v2.9的Winsoft ComPort for Delphi和C ++ Builder XE6-10.3完整源代码   适用于Android的Prolific设备的Delphi和C ++ Builder串行通信库。   使用Prolific PL2303库   无需特殊的root访问权限   可用于Delphi / C ++ Builder XE6-10.3   注册版本中包含的源代码   应用程序中的免版税分配   Delphi and C++ Builder serial communication library for Prolific devices for Android.   uses Prolific PL2303 library   no special root access privileges needed   available for Delphi/C++ Builder XE6 - 10.3   source code included in registered version   royalty free

Cannot perform this operation on a closed dataset

孤人 提交于 2020-01-21 14:45:31
问题 I am just trying to execute the "select" sql statement using TADOQuery component, but when TADOQuery's "Open" statement is executing I am getting following error: Cannot perform this operation on a closed dataset... ADOQuery1.Active := False; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('Select * from Table1 where Column1 = <value>'); ADOQuery1.Open; Any guess why I am getting this error ? 回答1: Your code looks fine. Check if there are any event handlers (OnBeforeOpen) or master/detail datasources

How ResourceString Identifiers are generated by delphi compiler?

牧云@^-^@ 提交于 2020-01-21 12:07:16
问题 My question is like Delphi compiler generates and assign numerical Identifiers to all the ResourceStrings when application is compiled, There are few documents which says when ever application is recompiled the numerical Identifiers for Resourcestrings are regenerated, and they warn relying on it because it may change after regenerations. There ate so many third party localization tools that use and store this resourcestring numerical identifiers for internal reference and translation. Is

How to get dimensions of image file in Delphi?

China☆狼群 提交于 2020-01-21 11:26:25
问题 I want to know width and height of an image file before opening that file. So, how to do that? EDIT: This refers to jpg, bmp, png and gif types of image files. 回答1: If by 'image file' you mean those raster image files recognised by the VCL's graphics system, and by 'before opening' you mean 'before the user is likely to notice that the file is opened', then you can do this very easily: var pict: TPicture; begin with TOpenDialog.Create(nil) do try if Execute then begin pict := TPicture.Create;

Prevent methods with empty bodies from deletion on save

丶灬走出姿态 提交于 2020-01-21 11:19:07
问题 It's quite a contradictory habit of mine to press Ctrl+S permanently. The negative side is that delphi deletes empty functions/procedures on save. Is there a way to prevent IDE from deleting functions/procedures with empty bodies on save? 回答1: Converted from the comment as per OP request. My comment is too tiny for an answer, so I'm going to add few details maybe already obvious to an OP. This happens with event handlers only¹. Write them without delay or comment them with todo ² ¹ That is,