Delphi

Delphi - Using TEdit.tagObject to point to another object

落爺英雄遲暮 提交于 2020-01-16 16:07:46
问题 I am using a descendant of TEdit and using TagObject to store an object. I'm using Firemonkey. In short, I am working with another object and want to assign a property of that object to my TMyEdit, so that whenever I load the object, the text gets updated, and when I change the text, the object gets updated. So I do it like this: Edit1 : TMyEdit; MyElement:TMyProperty; ... Edit1.TagObject:=TMyTextProperty(MyElement); (The typecast is necessary for other reasons. I mention it just in case it

Check if Element with ID has a value

拜拜、爱过 提交于 2020-01-16 13:31:13
问题 How to check if "Some text value" in element p with Id = "SomeID" is there? <p id="SomeID" class="error" style="display: none"></p> <p id="SomeID" class="error" style="display: none">Some text value</p> Here it is in a function form.. function ElementIdText(Web:TembeddedWB; Id:string):string; var node: string; begin if Assigned(Web.Document) and web.DocumentLoaded then begin node:=Web.OleObject.Document.GetElementByID(Id).innerText; if not VarIsNull(Node) and not VarIsClear(Node) and not

Undeclared identifier:

对着背影说爱祢 提交于 2020-01-16 13:17:09
问题 I have an EXCEL sheets witgh various C:\Documents and Settings\delfi\MilkDataMgr\FtsExcel.pas(2056):Undeclared identifier: smrBgm167GallonsGrosssDA' procedure convertXSLToDelfi(fuel: TFtsFuelTypes; const prefix: string); var ColumnNameMap : TStrings; i : Integer; other : string; begin { ColumnNameMap := TStrings; } ColumnNameMap := TStringList.Create; ColumnNameMap.Values['smrBgm229GallonsGross']:=' smrBgm167GallonsGrosssDA'; i := ColumnNameMap.IndexOfName(smrBgm229GallonsGross); if i >= 0

Why ini file is not being saved?

浪子不回头ぞ 提交于 2020-01-16 12:02:32
问题 I am trying to save unicode string. There is what I have: Uses IniFiles; const SZ_APP_NAME; Procedure TForm1.SaveSettings; var _MemIniU: TMemIniFile; SettingsPath: string; begin SettingsPath := GetHomePath + PathDelim + SZ_APP_NAME + PathDelim; _MemIniU := TMemIniFile.Create(ChangeFileExt(SettingsPath, 'Settings.ini'), TEncoding.UTF8); try if Form1.WindowState <> TWindowState.wsMaximized then begin _MemIniU.WriteInteger(SZ_APP_NAME, 'WindowLeft', Form1.Left); _MemIniU.WriteInteger(SZ_APP_NAME

Why ini file is not being saved?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-16 12:02:14
问题 I am trying to save unicode string. There is what I have: Uses IniFiles; const SZ_APP_NAME; Procedure TForm1.SaveSettings; var _MemIniU: TMemIniFile; SettingsPath: string; begin SettingsPath := GetHomePath + PathDelim + SZ_APP_NAME + PathDelim; _MemIniU := TMemIniFile.Create(ChangeFileExt(SettingsPath, 'Settings.ini'), TEncoding.UTF8); try if Form1.WindowState <> TWindowState.wsMaximized then begin _MemIniU.WriteInteger(SZ_APP_NAME, 'WindowLeft', Form1.Left); _MemIniU.WriteInteger(SZ_APP_NAME

Delphi DLL Modal Form causes AV on Second Call

二次信任 提交于 2020-01-16 08:55:30
问题 I am trying to show a modal (FMX) form from a DLL. Eventually this will be ported to OSX so I'm trying to keep the 'Windows' code to a minimum. Based on what's in the forum I have tried to keep the code as simple possible. I know that the first time showmodal is called, the code works as expected, but if I subsequently call the DLL function, I get an AV trying to create the form. I then tried to (without exiting the function) create and free the form several times, this works without issue.

Delphi DLL Modal Form causes AV on Second Call

限于喜欢 提交于 2020-01-16 08:55:04
问题 I am trying to show a modal (FMX) form from a DLL. Eventually this will be ported to OSX so I'm trying to keep the 'Windows' code to a minimum. Based on what's in the forum I have tried to keep the code as simple possible. I know that the first time showmodal is called, the code works as expected, but if I subsequently call the DLL function, I get an AV trying to create the form. I then tried to (without exiting the function) create and free the form several times, this works without issue.

TChromium : How to keep session alive

杀马特。学长 韩版系。学妹 提交于 2020-01-16 07:04:29
问题 When using DCEF3 TChromium, how can i keep the session alive ? For instance, if i go to a web-site and login on it, when i close my app and open it again, i need to login again. I want to keep the session alive, just like it would be if i use Google Chrome. I tried to add 'CefLib' on my app 'uses' clause and set 'CefCache' like the code below, but although i can see files being stored on 'cookies' folder, it seems to make no difference in keeping the session alive : program Project1; uses

Winsoft IOPort v5.3-SEO-狼术

青春壹個敷衍的年華 提交于 2020-01-16 05:59:17
  Winsoft IOPort v5.3 for Delphi & C++ Builder 5 - 10.3 Rio Full Source   用于Delphi和C ++ Builder 5的Winsoft IOPort v5.3-10.3 Rio完整源代码   用于访问Windows I / O和内存映射端口的Delphi和C ++ Builder组件。   访问32和64位Windows上的I / O和内存映射端口   使用Microsoft KMDF WDK框架构建的PnP设备驱动程序   易于使用,组件是完全可自动配置的   块数据传输可实现高速数据传输   DirectAccess模式提供对I / O端口的最快访问(仅32位Windows)   适用于Delphi / C ++ Builder 5-10.3和Lazarus 1.8.4   完整版本中包含的源代码   使用应用程序免费分发组件和设备驱动程序   Delphi and C++ Builder component for accessing Windows I/O and memory-mapped ports.   access to I/O and memory-mapped ports on 32 and 64-bit Windows   PnP device drivers built using

how to search for a file in all drives

﹥>﹥吖頭↗ 提交于 2020-01-16 05:37:06
问题 hey how can i search for a file in HDD , example i wanna search for a file settings.ini in my computer . 回答1: First you have to get a list of valid drives. This was discussed previously on the StackOverflow. The you have to call FindFirst/FindNext/FindClose on the root folder of each drive. Get a list of files and directories. Check the list of files. Repeat this for each directory. Until you run out of directories. Search for "[delphi] findfirst" on StackOverflow to find more information.