firemonkey-fm2

GetKeyState in firemonkey

China☆狼群 提交于 2019-12-04 20:06:37
In VCL (Delphi 2010) I used this function to check whether control key is pressed: function IsControlKeyPressed: Boolean; begin Result := GetKeyState(VK_CONTROL) < 0; end; GetKeyState is function in windows library that I do not want to include it into my project. How can I check if control or shift key is pressed in XE3 for firemonkey application? If it helps for anyone else, this is my unit: unit uUtils; interface uses {$IFDEF MSWINDOWS} Winapi.Windows; {$ELSE} Macapi.AppKit; {$ENDIF} function IsControlKeyPressed: Boolean; function IsShiftKeyPressed: Boolean; implementation function

Getting application path in Firemonkey

為{幸葍}努か 提交于 2019-12-03 16:11:02
问题 So in VCL, one would use the following line of code to retrieve the applications path: ExtractFilePath(Application.ExeName) I tried the same thing Firemokey and I noticed that ExeName was no longer available. What code can I use as an alternative to this? 回答1: Try using ParamStr(0) instead of Application.ExeName. 回答2: I'm using showmessage(System.SysUtils.GetCurrentDir); and works like a charm :) 来源: https://stackoverflow.com/questions/15218979/getting-application-path-in-firemonkey

Firemonkey: TGrid usage on Embarcadero C++ Builder XE3

为君一笑 提交于 2019-12-02 07:16:15
I'm try to build a tool that reads data from a database and displays it as a table using a TGrid in Firemonkey. I need to use different types of columns like TCheckColumn and TPopupColumn but can't find any good guide or example on how to use them in C++ Builder. Any way, I managed to understand the usage of the TStringColumn,TProgressColumn setting the Value of the cell in the TGrid's event onGetValue. Does any one of you know how to set the Value for columns of type TCheckColumn, TImageColumn and TPopupColumn? thanks Daniele ---UPDATE--- I managed to use the TProgressColumn. This is what I

How to programmatically alter Font properties in Firemonkey controls

社会主义新天地 提交于 2019-12-01 13:12:32
I have some code that paints a set of controls laid on top of a TImage. I then grab the TImage's MakeScreenshot to save out the file. This now works perfectly. What I am now struggling with is changing the font properties of one or more labels / text style controls. No matter what I try, the label does not change. Below is my sample code :- procedure TfrmSnapshot.Process; var LRect1, LRect2, LRect3, LRect4: TRectF; X, Y, W, H: Integer; begin // X := Round(Label1.Position.X); Y := Round(Label1.Position.Y); W := Round(X + Label1.Width); H := Round(Y + Label1.Height); LRect1.Create(X, Y, W, H); X

XE4 Deployment error

别来无恙 提交于 2019-11-30 16:28:44
Good afternoon all. Apologies if SO isn't the place to ask, I wasn't sure there was an 'errors stack exchange' or such, and whether or not any XE4 users would be visitors there. I'm currently trying out the XE4 trial, and I'm wanting to see just whether the iOS implementation is as easy as they made it look. I've got my remote profile all setup and working, and I've made a small application that only contains a progress bar. Now, when I deploy that application to the simulator, it runs on the iOS simulator as expected. However, when I try to deploy to a device, I get the following error; [DCC

XE4 Deployment error

泪湿孤枕 提交于 2019-11-30 16:25:56
问题 Good afternoon all. Apologies if SO isn't the place to ask, I wasn't sure there was an 'errors stack exchange' or such, and whether or not any XE4 users would be visitors there. I'm currently trying out the XE4 trial, and I'm wanting to see just whether the iOS implementation is as easy as they made it look. I've got my remote profile all setup and working, and I've made a small application that only contains a progress bar. Now, when I deploy that application to the simulator, it runs on the

How to hide firemonkey application button from Taskbar (XE4)?

半腔热情 提交于 2019-11-29 08:46:28
According to this question it is possible to hide fmx taskbar icon by changing window style to WS_EX_TOOLWINDOW . In XE2 and XE3 this code works: uses FMX.Platform.Win, Winapi.Windows; procedure TForm1.Button1Click(Sender: TObject); var h:THandle; begin h := FmxHandleToHWND(Handle); ShowWindow(h, SW_HIDE); SetWindowLong(h, GWL_EXSTYLE, GetWindowLong(h, GWL_EXSTYLE) or WS_EX_TOOLWINDOW); ShowWindow(h, SW_SHOW); end; In XE4 this solution does not work (application button should become hidden but nothing happens). any body have any idea? Thanks. Steve Swallow Just tried this in XE7 and of course

How to hide firemonkey application button from Taskbar (XE4)?

╄→尐↘猪︶ㄣ 提交于 2019-11-28 02:06:19
问题 According to this question it is possible to hide fmx taskbar icon by changing window style to WS_EX_TOOLWINDOW . In XE2 and XE3 this code works: uses FMX.Platform.Win, Winapi.Windows; procedure TForm1.Button1Click(Sender: TObject); var h:THandle; begin h := FmxHandleToHWND(Handle); ShowWindow(h, SW_HIDE); SetWindowLong(h, GWL_EXSTYLE, GetWindowLong(h, GWL_EXSTYLE) or WS_EX_TOOLWINDOW); ShowWindow(h, SW_SHOW); end; In XE4 this solution does not work (application button should become hidden