firemonkey

How to setup OpenGL1.4 environment in Firemonkey App?

冷暖自知 提交于 2019-12-04 22:46:57
问题 In older days I would create a TForm, place a TMyPanel on it (with overriden WM_PAINT message) and pass its Handle to a bunch of WGL functions that find a compatible pixelformat and create rendering context. Just like NeHe tutorials did it. Now there comes FireMonkey application. How to get OpenGL 1.4 rendering context there that is working on Win and iOS? EDIT: Been trying to make it to work by passing TForm.Handle (which is NativeUInt). Good news - no errors from OpenGL end, but bad news -

How to track the user location at full time with a delphi app under android/ios

妖精的绣舞 提交于 2019-12-04 20:19:45
I need to track all the time the user location, even when the user is not using my app. However my knowledge of android/ios architecture is little low to know how to do this. Do I need to make my full app alive in memory at all time (and I think this will be a little waste of resources) or do I need to create a small app like service (don't even know if it's possible) to do this job? Try to use android service with START_STICKY attribute. In background thread you can listen for location changes (do not use standard LocationSensor - just implement java interface based solution). You can also

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

Embeded DB for Firemonkey apps

喜欢而已 提交于 2019-12-04 19:45:25
Creating a client application, want the whole DB to be embed in the software or in a single standalone dll (ie sqlite), not something like mysql. Whats built into XE2 which would work 'out of the box' and not need thirdparty tools? Other than TClientDataSet / xml files :) You can use my SQLite wrapper (also some more info in my blog ) which supports multiple platforms. In Windows you'll need to deploy sqlite3.dll with your application, there is no need for this on OSX. You can get sources from the svn. Example usage: uses SQLiteTable3, {$IFDEF DELPHI16_UP} System.SysUtils; {$ELSE} SysUtils; {

How to detect the termination of a program in Android?

六眼飞鱼酱① 提交于 2019-12-04 13:18:03
When a Windows program terminates it calls event handlers like OnClose, OnDestroy and the destructor Destroy. When I want to save some INI settings these are the places to be. I wrote event handlers for all these events but they are not processed when I terminate the program. Does anyone know where I should place the code to be executed when an Android program terminates? I strongly suspect that this applies to iOS as well. Update Johan's answer works for Android as well, although reality is slightly more complicated than his examples. The nice thing was that it forced me into

Check whether the SD card is available or not programmatically using Delphi [closed]

不羁岁月 提交于 2019-12-04 10:43:14
I'm developing mobile application using Delphi 10 Seattle. I need to check programmatically, whether the SD card is available in the device using Delphi 10 Seattle? I have found the some sample using JAVA . And please provide me some example using Delphi Delphi does not define an interface for the Android Environment class, but you can define it manually in your own code, eg: uses ..., Androidapi.Helpers, Androidapi.JNIBridge, Androidapi.JNI.JavaTypes; type JEnvironment = interface; JEnvironmentClass = interface(JObjectClass) ['{D131F4D4-A6AD-43B7-B2B6-A9222BC46C74}'] function _GetMEDIA_BAD

How to release a Firemonkey control properly, in this case a child form with a parent?

瘦欲@ 提交于 2019-12-04 10:22:22
From inside an event handler of the control itself, I would like to delete and free it. A typical use case for TFmxObject.Release , isn't it? However, it only seems to work under Windows, but not Android, and this method is now deprecated anyway. I know, doesn't work is not a good problem description, but currently I'm not able to debug it under android. Under Windows, I see that the event handler continues correctly after the .Release and after it finished, my log message inside my controls destructor is executed. Under Android, the application hangs. When I use .Free instead, it still works

Removing firemonkey from Windows taskbar

旧巷老猫 提交于 2019-12-04 09:58:58
Is there a way, to remove my firemonkey application form Windows XP/vista/7 taskbar? There is no info when i google. The problem: How to hide the form that is located in a dll from the Windows taskbar. rjstelling NB: Talibek answered his own question within the question, for clarity I have moved it here. You need to get your main form handle ( Form1.Handle ), because there is no Application.handle in firemonkey, then convert it with FmxHandleToHWND ( FMX.Platform.Win ) to normal window handle. From your host application, you need to retrive that handle (you can export a function with it) and

Why is drawing a line less than 1.5 pixels thick twice as slow as drawing a line 10 pixels thick?

♀尐吖头ヾ 提交于 2019-12-04 08:03:10
问题 I'm just playing around with FireMonkey to see if graphical painting is any faster than GDI or Graphics32 (my library of choice at the moment). To see how fast it is, I've performed some tests, but I run into some odd behaviour: Drawing thin lines (<1.5 pixel wide) seems to be extremely slow compared thicker lines: Vertical axis: cpu ticks to paint 1000 lines Horizontal axis: line tickness* The results are quite stable; drawing always becomes much faster once line thickness is more than 1

Firemonkey TWebBrowser input alternative?

北战南征 提交于 2019-12-04 07:15:54
As Embarcadero said : " WebBrowser Does Not Accept Keyboard Input on Android On Android devices, the on-screen keyboard is not available in a TWebBrowser control. This means that a user cannot complete a web form, for example. The TWebBrowser control should be used for displaying information or documents. User interaction should be performed with FireMonkey controls. " Link This is very annoying if we have to use Clouds identification pages like Dropbox or Google Drive. Using Delphi XE5 with REST components, I'm able to open the login pages, but the keyboard is not functional on Android. So