Delphi

Capturing signature very sketchy on touch screen

雨燕双飞 提交于 2020-01-15 07:17:23
问题 I followed a tutorial for capturing signatures in Firemonkey, and made some major modifications (essentially a re-write) to encapsulate it inside of a custom control. I've written plenty controls in VCL, but this is my first for FMX. When using this with a mouse (Windows or OS X), it works perfectly. However, when using a touch screen (iOS), it becomes extremely sketchy. Specifically, it keeps capturing a mouse up event (or in this context, "pen up"). So a straight line becomes actually a

Freeing interfaced object that descends from a TRectangle

梦想与她 提交于 2020-01-15 06:58:05
问题 I'm new to interfaces and have been trying them out in my latest project. I have this (simplified) interface: IBoardShape = interface(IInterface) function GetColor: integer; procedure SetColor(const aColor: integer); property Color: integer read GetColor write SetColor; end; Several classes descend from it like so: TGameRectangle = class(TRectangle, IBoardShape) private FColor: integer; function GetColor: integer; procedure SetColor(const aColor: integer); property Color: integer read

Any way to authenticate with a websense server from delphi?

断了今生、忘了曾经 提交于 2020-01-15 06:25:28
问题 We use a websense internet filter at my workplace. I have an application that tries to retrieve information from the internet. On my client machine, I have to authenticate with websense manually (i.e., open firefox and give my username / password) or I'll get an error in my application when it tries to do the download. The error message is: HTTP/1.0 302 Moved. Does anyone know of a way to authenticate with websense from code? Examples in any language are welcome- I am using Delphi and Indy's

How to properly define a TCustomFrame's child class?

拥有回忆 提交于 2020-01-15 06:13:45
问题 I'm trying to define a child class of TCustomFrame but I get an error on TabOrder property. These are steps I've followed: Add a new TFrame descendant to the form (Right click on project, add new, other, frame). Switch the parent class from TFrame to TCustomFrame. TMyFrame = class(TCustomFrame) Check TFrame definition and publish exactly the same properties (Doing so, TMyFrame should be identical to TFrame, right?). Save and close. Open unit in which TMyFrame is defined. It gets an error

Delphi: Minimize application to systray

天涯浪子 提交于 2020-01-15 05:48:21
问题 I want to minimize a Delphi application to the systray instead of the task bar. The necessary steps seem to be the following: Create icon which should then be displayed in the systray. When the user clicks the [-] to minimize the application, do the following: Hide the form. Add the icon (step #1) to the systray. Hide/delete the application's entry in the task bar. When the user double-clicks the application's icon in the systray, do the following: Show the form. Un-minimize the application

Datasnap in 10.3 Rio incompatible with previous versions

那年仲夏 提交于 2020-01-15 05:48:05
问题 We have a problem with Datasnap RESTfull, it seem to have an incompatibility between 10.3 Rio and 10.2 Tokyo (and all bellow) about Datasnap RESTfull function implementation. The problem: We have a server, builded with 10.2 currently running and servicing a lot of users. If we update the server with the one compiled with Delphi 10.3 Rio, the current 10.2 client (Win, MacOS, iOS, Android) receive the following error message: Internal: Field FValue cannot be found in type TJSONString. Conversly

Notifying the Datasanap Server if the a client closed abnormal

浪子不回头ぞ 提交于 2020-01-15 05:33:07
问题 I am working on HTTP DataSnap project using Delphi 2010. How to Notify the server that an client is closed abnormal (Killing Proces for ex.)? more detail: I need my server to know if any client is disconnected, Its OK but the problem is raised when the client is closed by task manager using Kill process. 回答1: You don't notify the server that the client crashed. You generally can't because you have nothing to notify it with — your only connection to the server was the client, and the client

How to delete a child node using OmniXML?

非 Y 不嫁゛ 提交于 2020-01-15 05:19:04
问题 I'd like to delete the line with pathid="2" in the rowpath section... <?xml version="1.0" encoding="utf-8"?> <LostPath Condition="Active" Selected="train.exe" FullPathOfSelected="D:\mygames\arcade\train\" Selected="0"> <rowdir Name="train.exe" GamePath="D:\mygames\arcade\train\" Selected="0" /> <rowdir Name="othelo.exe" GamePath="D:\mygames\arcade\othello\" Selected="3"/> <rowpath Name="train.exe" PathId="1" LevelPath="D:\mygames\arcade\train\levelpack1" levelsFound="27" /> <rowpath Name=

The system cannot find the file specified

微笑、不失礼 提交于 2020-01-15 04:56:07
问题 The file is inside the directory where the software is. I am trying to add the text file to the memo box. procedure TForm4.FormCreate(Sender: TObject); var dir : string; begin Form4.Caption:='Abateri instrumente'; dir := GetCurrentDir; Memo1.Lines.LoadFromFile(dir+'\abateri.txt'); end; 回答1: In your specific situation, you should load the file with the code Memo1.Lines.LoadFromFile(dir+'\abateri.txt.txt'); This is because in the below screenshot that you provided, the extension of the Project3

Pressing Buttons on a web page via Delphi [duplicate]

五迷三道 提交于 2020-01-15 04:28:06
问题 This question already has answers here : How to find a button with “value” in html page (Webbrowser - Delphi) (2 answers) Closed 5 years ago . Ex1: WebBrowser.OleObject.Document.GetElementByID('ID HERE').Click; Ex2: < input type="submit" VALUE="Login" > The above two examples are for pressing buttons on web pages via Delphi. Ex2 works well on various web sites but not all. Is this because Ex2 only works on HTML buttons? I tried Ex1 but some code is missing, when I try it, I get a message