delphi-7

Delphi not showing object/component “hints” when I am codding

点点圈 提交于 2019-12-11 19:18:38
问题 If i'm not mistaken delphi has the ability to show a list of options after you insert a component name followed by the "." (dot) that precedes more arguments. My delphi 7 is not showing this list after the "." Ex: When I enter form1.edit1. It should show a list of options for an "TEdit" component. Not happening, what's wrong? Code: unit Banri; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Clipbrd; type TForm1 = class(TForm)

Select Multiple Rows on Shift+Click in DBGrid

筅森魡賤 提交于 2019-12-11 19:12:19
问题 I need to write the code to select multiple rows on Shift+MouseClick, so that I am able to fill down the values. Is there any way I can do it? My DBGrid options are as follows: dbGrid1.Options = [dgEditing, dgAlwaysShowEditor, dgTitles, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgMultiSelect] 回答1: I originally thought that a problem you would be likely to have with this is that Shift + Click is handled by the grid itself, so the time the Grid's OnMouseUp fires, the grid

Calling a callback function in Delphi from a C++ DLL

淺唱寂寞╮ 提交于 2019-12-11 15:14:01
问题 I have a C++ DLL that I wrote that has a single exposed function, that takes a function pointer (callback function) as a parameter. #define DllExport extern "C" __declspec( dllexport ) DllExport bool RegisterCallbackGetProperty( bool (*GetProperty)( UINT object_type, UINT object_instnace, UINT property_identifer, UINT device_identifier, float * value ) ) { // Do something. } I want to be able to call this exposed C++ DLL function from within a Delphi application and register the callback

How To Get An Unique ID? [duplicate]

≡放荡痞女 提交于 2019-12-11 14:58:52
问题 This question already has answers here : Closed 9 years ago . How can i get an unique id from one of installed hardwares? Something like h.d.d serial or motherboard, ....? Thanks 回答1: Check this URL : http://www.diskserialnumber.com/ http://www.diskserialnumber.com/get-disk-serial Better one: http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx 回答2: We use http://www.magsys.co.uk/delphi/magwmi.asp and are very happy with it. 来源: https://stackoverflow.com/questions/3700195/how-to-get-an

Encoding in Indy 10 and Delphi

江枫思渺然 提交于 2019-12-11 13:19:31
问题 I am using Indy 10 with Delphi. Following is my code which uses EncodeString method of Indy to encode a string. var EncodedString : String; StringToBeEncoded : String; EncoderMIME: TIdEncoderMIME; .... .... EncodedString := EncoderMIME.EncodeString(StringToBeEncoded); I am not getting the correct value in encoded sting. 回答1: What is the purpose of IndyTextEncoding_OSDefault ? Here's the source code for IndyTextEncoding_OSDefault . function IndyTextEncoding_OSDefault: IIdTextEncoding; begin if

Unsupported on-disk structure for file mydatabase.fdb

╄→гoц情女王★ 提交于 2019-12-11 13:19:29
问题 My old delphi 7 application was using devart Interbase driver to connect with mydatabase.fdb. When I migrated this application to delphi xe4, I installed latest version of devart interbase for delphi xe4. But with this version, I am getting following error: Unsupported on-disk structure for file mydatabase.fdb What is the cause of this error? How should I get rid from it? I found the link: http://www.firebirdfaq.org/faq80/ 2 reasons are mentioned there for possible causes for this error. But

Change character in Tedit Delphi

感情迁移 提交于 2019-12-11 08:28:35
问题 Sorry for my bad english. How to block a character in TEdit if I have text 'Kamu' in first TEdit and 'Dia' in 2nd TEdit where character is 'a' and change them to 'i' in 3rd TEdit? 回答1: Use StringReplace. NewValue := StringReplace(OldValue, 'a', 'i', [rfReplaceAll, rfIgnoreCase]); You may want to omit rfIgnoreCase depending on your needs. You can read from and write to the content of the TEdit control by using its Text property. For instance: Edit1.Text := StringReplace(Edit1.Text, ...); 来源:

Programmaticaly click on a link in webbrowser using DOM delphi 7

99封情书 提交于 2019-12-11 08:23:03
问题 <span id="lblCommande">Bon de commande</span></a>| <a href="retour.aspx"> This is the link I want to "click" using a button. I know how to click a button using this: WebBrowser.OleObject.Document.GetElementByID('ID HERE').Click; But that doesn'T work for links. Any ideas? 回答1: Ok I found it. Here's how: WebBrowser.OleObject.Document.GetElementByID('lblcommande').Click; 来源: https://stackoverflow.com/questions/10593494/programmaticaly-click-on-a-link-in-webbrowser-using-dom-delphi-7

Property ExplicitLeft does not exist

无人久伴 提交于 2019-12-11 07:59:39
问题 I'm having an a error when I'm creating or editing a TEXT OBJECT on Fastreport using Delphi 7. Here's the error: Error reading TextTS->ExplicitLeft: Property ExplicitLeft does not exist. What am I doing wrong? 回答1: As per @RUZZ's link: You are getting this error because you're opening a DFM file that was created by a Delphi version newer than D7. ExplicitLeft is a property unknown in D7, is was added in a later version (not sure which). There are three options: Use a newer version of Delphi.

Setting Internet Proxy in IE on active dial up or vpn connection in delphi

拈花ヽ惹草 提交于 2019-12-11 07:29:10
问题 I want to set proxy in action connection for IE with Delphi codes. I test this code: Procedure SetProxy(const Server: String); var Reg : TRegistry; begin Reg := TRegistry.Create; Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Internet Settings',False); Reg.WriteString('ProxyServer',Server); Reg.WriteBool('ProxyEnable',True); Reg.CloseKey; Reg.Free; InternetSetOption(0, INTERNET_OPTION_SETTINGS_CHANGED, 0, 0); end; But it is change only LAN Setting in IE Internet Option . Anyone have a