FAQ Database Discussion Community


Delphi XE7 iOs Developing

ios,delphi,delphi-xe7
I'm trying to set up the environment for installing an iOS App developed by Delphi XE7. The thing is my Mac OS X is the version 10.6.8 and the higgest Xcode I can install is the 3.2. Is it possible to work with such scenario?

Base64-decode a string using NetEncoding in Delphi XE7?

delphi,base64,decode,delphi-xe7,utf8-decode
In Delphi XE7 Update 1, when trying to execute this code in a VCL program: uses System.NetEncoding; ... tempstring := TNetEncoding.Base64.Decode(tempstring); I get this error message: So how can I base64-decode a string using NetEncoding?...

Launch HTML Help as Separate Process

delphi,delphi-xe7,chm,html-help
I am using XE7 64 and I am looking for a strategy to solve several problems I am having when displaying HTMLHelp files from within my applications (I have added the HTMLHelpViewer to my uses clause). The issues are the following: 1) Ctrl-c does not copy text from topics; 2)...

How to send email with attachment using default Android email app - Delphi XE7

android,delphi,android-intent,firemonkey,delphi-xe7
Using code below which I found on another post, the email appears ready to send with the attachment, but when email is received, there is no attachment. Also, the email address has to be manually entered, it is not populated by the CreateEmail statement. I am sending from a gmail...

Adding a delay or sleep to my routine in a Delphi Multi-device application

delphi,firemonkey,delphi-xe7
Using Dephi XE-7 and FMX (Multi-device application) - currenly compiling in Win32 I am using Raize Radiant Shapes and trying to create a demo where I can iterate through all the RadiantCircles and change their stroke and fill colors. I have four RadiantCircles arranged vertically on my screen. The code...

Convert BitMap to string without line breaks?

delphi,bitmap,encode,delphi-xe7
Somewhere I found this code to convert a BitMap to a string: function Base64FromBitmap(Bitmap: TBitmap): string; var Input: TBytesStream; Output: TStringStream; begin Input := TBytesStream.Create; try Bitmap.SaveToStream(Input); Input.Position := 0; Output := TStringStream.Create('', TEncoding.ASCII); try Soap.EncdDecd.EncodeStream(Input, Output); Result := Output.DataString; finally Output.Free; end; finally Input.Free; end; end; However, this gives...

how do i align a tpanel to a very bottom of listview item

delphi,listviewitem,delphi-xe7
what i try to do is same as this image thing i have tried panel1.top := ListView1.Items[i].position.Y; but it didnt success with this trick , is there possibly way to aligned Tpanel at a bottom of some items Actual code added procedure Ttestthreading.streamClick(Sender: TObject); var i, R: integer; begin if...

Can I compare Real48 using generics.defaults?

delphi,delphi-xe7,delphi-xe8
The following code to compare two Real48's (6-byte float) compiles and runs, but either generates non-nonsensical results or generates a AV. program Project44; {$APPTYPE CONSOLE} uses System.SysUtils, System.Generics.Defaults; begin try WriteLn(System.Generics.Defaults.TComparer<Real48>.Default.Compare(100.0,100.0)); WriteLn('all ok, press space'); except on E:exception do WriteLn(e.Message); end; ReadLn end. It should output 0, but if it...

How to get the shell folder icon location for a specific folder?

delphi,delphi-xe7,shell-icons
In Delphi XE7, I need to get the LOCATION of the icon used by Windows Explorer to display a folder, especially in thumbnail view. So I use this code: var Shell32DllFilePath: string; // Get shell32.dll FilePath: Shell32DllFilePath := IncludeTrailingPathDelimiter(JclSysInfo.GetWindowsSystemFolder) + 'shell32.dll'; if not FileExists(Shell32DllFilePath) then begin Shell32DllFilePath := ''; //...

How to change the colour of the stringgrid particular cell using Delphi XE7

delphi,firemonkey,delphi-xe7,tgrid,firemonkey-style
I'm using Delphi XE7 for developing Android application. In that I have used TStringGrid component and then I have used StringGrid.cells[0, 0] := 'Test' And how can I change the Font colour of that particular cell which I have shown in the code. And also I have this sample code,...

Managing very large codebases in Delphi using a Library of Debug and Regular DCUs I built myself

delphi,packages,delphi-xe6,delphi-xe7
I am trying to resolve this compile error, occuring only in Debug config, and only in the case described below: [dcc32 Fatal Error] MyIndyTCPChannel.pas(22): F2051 Unit IdIOHandlerSocket was compiled with a different version of IdGlobal.IdDisposeAndNil I am working on a very large Delphi codebase, with 2.5 million lines of in-house...

How can I get a TDBLookupComboBox to show what you are typing?

delphi,delphi-xe7
I have a TDBLookupComboBox on my form. When I put my cursor in it and type, the selection jumps a head to what I've typed (or as close as it can). However I don't get any indication of what I've typed in the field. TDBComboBox performs similarly to TDBLookupComboBox however,...

How to modify RTF file with images from the code

delphi,rtf,delphi-xe7,trichedit
I have template of document in RTF format and it contains some text and some images (created with WordPad, Win 7). I need to change some text and save it. I am trying to do it like this (Delphi XE7, Win32 platform, Windows 7 x64 SP1): RichEdit1.Lines.LoadFromFile('1.rtf'); RichEdit1.Lines.SaveToFile('2.rtf'); So i...

How to solve Indy socket error #111 connection refused between Delphi 2007 server and RAD XE7 client?

android,delphi,indy,delphi-2007,delphi-xe7
When I click on the button in the server the debugger shows two threads are started, I'm assuming one is the main thread and the other one is the server's thread, but the ServerExecute procedure is never executed, which I think causes the connection refused error. How can I fix...

how to create custom keyboard for my app

delphi,ios8,firemonkey,delphi-xe7
I need to create custom keyboard for some TEdit in my (and only my) application for iOS8. Other edit`s need default iPad keyboard. In Objective-C it`s look simple - just create UIView and assign it to myTextField.inputView (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/index.html#//apple_ref/occ/instp/UITextField/inputView). How can i do it in FMX (Delphi XE7)? Update. UITextField declared...

What would the design look like for a class that implements a threaded email sending queue?

multithreading,delphi,delphi-xe7,omnithreadlibrary
So my application is a taxi call dispatch system, in which an operator receives calls over the phone and assigns received calls to a driver. On the Call Details form where the call detail is entered, as soon as the Save button is clicked, the form should close, should send...

JSONMarshal: Is it possible to serialize/desrialize into/from 'plain' JSON (without metadata)?

json,web-services,delphi,serialization,delphi-xe7
I'm writing a DataSnap Rest Client (in Delphi) and I want it to provide data in json format to a lot of platforms (like C#, java, C++, Delphi). I'm using TJsonMarshal to serialize an object. I'm using something similar to this: marshal := TJSONMarshal.Create(TJSONConverter.create); jsonString := marshal.marshal(myObject).ToString; But When I...

Pass different record types as parameter in a procedure?

delphi,record,delphi-xe7
Is there a trick to pass records with different type as parameter in a procedure? For example, look at this pseudo-code: type TPerson = record Species: string; CountLegs: Integer; end; TSpider = record Species: string; CountLegs: Integer; Color: TColor; end; var APerson: TPerson; ASpider: TSpider; // Is there a trick...

Is there an easier way to refactor this in Delphi?

delphi,delphi-xe7
When I update the name of an object in the Object Inspector (e.g., fruitsList: TListBox; becomes foodList: TListBox;), is there way to have it update all references to it as well? The events that are attached to this object are of course renamed appropriately, but I've got other references to...

Delphi - Generics type constraint ordinal types

delphi,generics,delphi-xe7
I want to bound type T for both types Integer and string: interface type MyFactory<T> = class public function createGenerator<T:Integer,string>:IGenerator<T>; end; But the compiler gives: '(..) E2510 Type 'Integer' is not a valid constraint'. How can I restrict type T to be a Integer or string? Or is this a...

Delphi XE7 Bitmap size to big message on Android

android,image,delphi,bitmap,delphi-xe7
When I take a picture on my Android phone my XE7 app crashes and it says Bitmap size to big. But I use code i've used before and it worked fine. It's from the example of embarcadero about taking pictures on android/iOS. My code below: procedure TForm1.TakePhotoFromCameraAction1DidFinishTaking( Image: TBitmap); var...

How can I change the colour of the toolbar in a FireMonkey mobile application

android,delphi,firemonkey,delphi-xe7,firemonkey-style
I'm using Delphi XE7 for developing mobile application. And how can I change the colour of the TToolbar component in Firemonkey mobile application? I can not find the option in the Object Inspector. Is there any other option to change the colour of this component. And I'm targeting Android platform....

Reg. iOs mobile app developement hardware requirements using Delphi XE7

ios,delphi,firemonkey,delphi-xe7
I'm using Delphi XE7 for developing mobile application. And some how, I have learnt how to create and test the Android mobile application using Delphi XE7 and for developing and testing Android application, just one Android mobile is enough. And I need to know the hardware requirements for developing and...

Delphi XE7 Android Record with String Element won't compile

android,delphi,firemonkey,delphi-xe7
In Delphi FMX XE7, Win32, I have a record type: type TSettingsRec = record SessionTimeOut: Word; EventString: String[50]; end; When I change the Target to Android, I get a compiler error: [DCC Error] MainForm.pas(45): E2029 ';' expected but '[' found I need to define the length[50] of the EventString element...

OmniXML on iOS: Invalid Unicode

delphi,firemonkey,delphi-xe7,omnixml
I recently switched to use the OmniXML included with Delphi XE7, to allow targeting iOS. The XML data comes from a cloud service and includes nodes with base64 encoded binary data. Now I get this exeception "Invalid Unicode Character value for this platform" when calling XMLDocument.LoadFromStream, and it seems to...

How to get model number of the phone?

android,delphi,firemonkey,delphi-xe7
I am targeting Android with Delphi XE7. I would like to obtain the model number of the phone. That is, I would like to obtain the information highlighted in this image: How can I achieve this?...

How to detect 32/64 platform?

delphi,32bit-64bit,delphi-xe7
I need to detect if the app is running on Win32/64. Update: People are reporting that relying on the [HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0] key is not a good idea. ...

How play .mp3 files loaded from a URL in TMediaPlayer with Firemonkey?

mp3,media-player,firemonkey,playback,delphi-xe7
Is there any way to play .mp3 files from a URL using TMediaPlayer with Firemonkey in Delphi XE7?, this code doesn't works; MediaPlayer1.FileName := 'http://wwww.some_site.com/some_song.mp3'; MediaPlayer1.Play; it throws an exception of File not found, so I suppose that TMediaPlayer works only with local files, isn't it?, please, any helps it...

access event handlers for FMX styled objects

delphi,delphi-xe7
How can I access the event handler of a styled button. For example, this works: ListBoxItem.StylesData['detail2.text'] := date; but not this: ListBoxItem.StylesData['downloadbutton.OnClick'] := LoadFileContent; //says not enough parameters. So when I put in 'LoadFileContent(nil) then I get an imcompatible types error message ...

How can I turn off autorefcount in Delphi XE7?

delphi,delphi-xe7
The system I'm working on has made their own ref counting unit, but it's conflicting with the Delphi one. I've tried to make it compatible with compiler conditions, but I've still come across several bugs that I think might be caused because ARC is still on.

'Session Ended' when lauching app from Delphi to iOS Simulator

delphi,ios-simulator,delphi-xe7,paserver
I'm trying to deploy a multi-platform application (written in Delphi XE7 + Firemonkey) to iOS Simulator, through these parameters: Delphi XE7 OSX 10.8 Mountain Lion XCode 5.1.1 Command Line Tools PAServer 15.0 (iOS SDK 7.1 - also tested with 6.1) My Application needs to work in Windows, Android, iOS and...

Check if database has support for transactions using FireDac

delphi,delphi-xe7,dbexpress,firedac
How can I check if the DBMS has support for Transactions, using FireDac components? Usually, I use something like the follow code, to perform a transaction in my DAO class, using dbExpress. ... connection: TSQLConnection; dbxTransaction: TDBXTransaction; ... if (connection.TransactionsSupported) AND ((not connection.InTransaction) OR (connection.MultipleTransactionsSupported)) then begin dbxTransaction := connection.BeginTransaction(TDBXIsolations.ReadCommitted);...

Why does Delphi XE7 change PNG image on every FMX form save?

delphi,png,firemonkey,delphi-xe7
I have a form with many custom firemonkey components where each contain multiple bitmaps (loaded from PNG image files). Every time the form is saved, the binary data of the PNG images change in the FMX file! This messes up my version control log (SVN), as changing just one property...

Event is not getting fired

delphi,delphi-xe7,twebbrowser
I am trying to use the WebWorkerStarted and WebWorkerFinished from TWebbrowser however the events just don't get fired at all. How can I get these events working? I want to see which worker threads are getting launched from TWebbrowser. unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls,...

Access violation when opening form 2th time on Android in Delphi XE7

android,forms,delphi,firemonkey,delphi-xe7
When I open my form for the first time I get no violation, but when I first select a TEdit field and then close the form and then recreate the form and open it I get the Violation. Code for creating the form: procedure TfrmNocoreDKS.actConfigExecute(Sender: TObject); var confForm: TConfiguratie; begin...

Why do I get “Duplicate entry” exception when inserting a record?

mysql,delphi,delphi-xe7,firedac
I am getting this error message: [FireDAC][Phys][MySQL] Duplicate entry '1111' for key 'PRIMARY' when trying to insert data into the database. The only data in the database is a tuple with the primary key '0000', so I know the primary key isn't a duplicate of another key. The data is...

Delphi XE7 and BDE TStoredProc trouble?

delphi,firebird,delphi-xe7,bde
I have to migrate an old Delphi 4/BDE/Firebird 1.5. As a first step, I would like to convert it under Delphi XE7/BDE/Firebird 1.5. When all or most of migration bugs will be corrected I'll update Firebird and may later change the BDE. But I have trouble with a simple use...

How use case with findwindow

delphi,case,delphi-xe7
how using CASE in the following code? if (Pos('1080', IntToStr(Screen.Height)) > 0) and (FindWindow(nil, 'Stack Overflow - Google Chrome') > 0) then begin Form1.Top := 66; Form1.Left := 546; end; if (Pos('1080', IntToStr(Screen.Height)) > 0) and (FindWindow(nil, 'Stack Overflow - Mozilla Firefox') > 0) then begin Form1.Top := 76; Form1.Left...

Delphi Android App crash on keyboard connect/disconnect

android,delphi,keyboard,firemonkey,delphi-xe7
Create an Android App, drop an edit box, run the App. Connect a barcode scanner, the App Crash. Connect the barcode scanner and run the App, everything works fine. Disconnect the scanner and the App crash. If the App is runnig you cannot connect/disconnect a keyboard/barcode scanner no matter if...

Delphi XE7 XML Documentation

delphi,delphi-xe7,xml-documentation
In Delphi XE2, there was an IDE feature which allowed me to create in-line XML code documentation (following Microsoft standards) in an editor window. It would describe each class, type, method, etc. in the interface section of a unit. However, in Delphi XE7, I cannot find it. I've done some...

E2107 Operand size mismatch

delphi,assembly,delphi-xe7
I use this functions since D2007 I got it online, don't remember where. But now in XE7 it return a compilation error: "E2107 Operand size mismatch" function FastCharPos(const aSource : string; const C: Char; StartPos : Integer) : Integer; var L : Integer; begin //If this assert failed, it is...

XE7 link runtime package issue

delphi,delphi-xe7,runtime-packages
I am moving my code from Delphi 2007 to XE7. My program use late binding package way. So I compile my application with "link with runtime packages" options. I used this way for a long time with 2007. But in XE7, same package structure, cause: "Unit X was compiled with...

Messagedlg in Delphi xe7 android

android,delphi,delphi-xe7
I m just trying to execute a sample given during the installation of Delphi xe7, the MessageAlerts on android platform, unfortunately it does not working , it gives the following error message : Blocking Dialogs not implemented in this platform : procedure TMessageAlertsForm.btnMultiButtonAlertClick(Sender: TObject); begin { Show a multiple-button alert...

Move form to bottom right corner

forms,delphi,delphi-xe7
I've been struggling for some time to move a run-time created form to the bottom right corner of the main form. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) Button1: TButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5:...

Application terminates for no apparent reason

delphi,delphi-xe7
I have setup my login procedure with an available form (Form4) and a MainForm. On the available form (form4) I have: var Form4: TForm4; procedure Login; implementation ..... The 'Login' procedure goes: procedure Login; begin with TForm4.Create(nil) do try Application.MainForm.Hide; if ShowModal = mrOK then Application.MainForm.Show else Application.Terminate; finally Free;...

Strings getting corrupted in ComboBox.AddObject. How to add them the proper way?

delphi,delphi-xe7
I'm adding strings with objects (also strings) to a TComboBox, but getting corrupted strings when trying to retrieve them later. This is how I'm adding them: var i: Integer; sl: TStringList; c: Integer; s: PChar; begin for i := 1 to tblCalls.FieldCount do if tblCalls.Fields[i - 1].Tag = 1 then...

HasValidFileNameChars fails for UNC files

delphi,delphi-xe,delphi-xe7
For me HasValidFileNameChars function (in Delphi XE7) returns false for UNC files: B:= IOUtils.TPath.HasValidFileNameChars('\\ETA-PC\tests\test.ini', FALSE) B is false now This means that if you try to validate the filename that I show in my test (yes the file is real and as you can see its name is correct) HasValidFileNameChars...

Array of Colors

delphi,delphi-xe7
I am trying to work with an array of colors that is a constant. But Delphi keeps giving me compiling errors. I can't seem to figure out what I'm doing wrong... const Statuses : array[0..3] of TAlphaColors = ( TAlphaColors.Lightgray, //error here: says insert a '(', even though I already...

Json Array into ListBox/Memo in Delphi xe7

json,delphi,delphi-xe7
I'm trying to catch the following JSON array : [{"name":"Bryan","email":"[email protected]"}, {"name":"Louis","email":"[email protected]"}, {"name":"Maria","email":"[email protected]"}, {"name":"Test","email":"[email protected]"}, {"name":"Anthony","email":"[email protected]"}] and put it in Memo or ListBox in Delphi : the code is the following : procedure TForm1.Button1Click(Sender: TObject); var jv: TJSONValue; jo: TJSONObject; jp: TJSONPair; ja: TJSONArray; i: integer; j: integer; begin RESTRequest1.Execute; jv:=RESTResponse1.JSONValue;...

Can I use a TDBLookupComboBox without a DataSource

delphi,delphi-xe7
I need a combobox on one of my forms. I'd like to use a TDBLookupComboBox instead of a classic TComboBox because I'd like to avoid the pain of populating a TComboBox in code (I like TDBLookupComboBox's list source, etc.) The problem is I don't have a DataSource to attach the...

E2003 Undeclared identifier: 'mtConfirmation' and 'mbOK'

delphi,compiler-errors,dialog,delphi-xe7
From what I can tell both of those are supposed to be in System.UITypes, which I'm using, but I still get the error message. How can I fix this? I've based the message dialog from the example in http://docwiki.embarcadero.com/CodeExamples/XE7/en/FileExists_(Delphi) The original code came from http://delphi.radsoft.com.au/2013/11/checking-for-an-internet-connection-on-mobile-devices-with-delphi-xe5/ unit Unit1; interface uses System.SysUtils,...

Handle not Allocated on setting form property on Android in Delphi XE7

android,forms,delphi,firemonkey,delphi-xe7
I'm having problem opening a new form that i've created in XE7. I have no problems opening the form on my Samsung Galaxt tab2, but when I want to open it on my Sony Xperia ZR I get a Handle not Allocated exception. Here is the code: procedure TfrmNocoreDKS.actOpenDocumentExecute(Sender: TObject);...

Convert TUnicodeStrings to TStrings?

delphi,delphi-xe7,unicode-string
In Delphi XE7 I use the well known DragAndDropSuite from Anders Melander. The TDropFileTarget component from this suite gives back the dropped files as TUnicodeStrings. However, I NEED to use these files in a procedure which has a TStrings parameter: procedure DoSomethingWithTheseFiles(const AFiles: TStrings); begin // Do something... end; procedure...

Exclude VCL Styles from styling Dialog / ShowMessage borders

delphi,vcl,delphi-xe7,vcl-styles
Is there any way to exclude VCL Styles from styling a system dialogs' border. Sepecifically a dialog that is shown by calling MessageDlg or ShowMessage. I read some articles on "The Road To Delphi" (which is an excellent site btw) but couldn't find the answer. Here is what i want...

how much size of data can be send in tidtcpclient in delphi xe7

android,delphi,firemonkey,delphi-xe7,tclientsocket
I'm using Delphi XE7 for developing mobile application. And I'm using TIdtcpClient component to interact with the Server application. And I need to know for Android mobile & iOs mobile app, what is maximum size of data which I can send at a time to server. Or it depends on...

Restrict list of components when linking in property editor in IDE

delphi,custom-component,delphi-xe7
I have created a new designtime component, which contains a published property Handler of type TComponent and registered it into the Tool Palette. When i place a component of this type on my form, the property editor of the IDE shows me the property 'Handler' with a dropdown box that...

Fast way to identify the location the current procedure was called from

delphi,delphi-xe7
I need to find a way to identify the location that the current function or procedure in a class was called from. It doesn't matter if the result is a memory location or a unit and line number, just something that uniquely the position that the call came from. The...

How to add values to an exisiting TPieSeries via Delphi Xe7

delphi,teechart,delphi-xe7
As the title suggest, how can I add a value to an already existing pie slice in a TPieseries within the TChart component. delphi XE7 for iOS FMX...

cxgrid expand grouped data using cxDateEdit

delphi,devexpress,delphi-xe7,tcxgrid
My displayed data in the cxGrid is grouped by date (collapsed) . Is there a way I can expand this grouped data "only" for a selected date using cxDateEdit for the occasion ? Right now,all I could manage is to collapes or expand all data using buttons: procedure TArchive.EXPANDClick(Sender: TObject);...

Check if SQL Server is reachable [closed]

delphi,delphi-xe7
I would like to log in to a SQL Server instance (MSSQLSERVER) and to a particular database (DB1). How can I do that with Delphi? A nice way that would cover the exceptions and sensible warning messages? Edit: I would like to see an working example on how to go...

Why does my application using OmniThreadLibrary Parallel.Pipeline continue remain running in the background after being closed?

multithreading,delphi,delphi-xe7,omnithreadlibrary
I'm using OmniThreadLibrary to implement a background pipleline for sending emails (refer to this SO question). I notice that after closing the application, it continues running in the background (seen in Windows Task Manager). That means that there is something wrong in my code in the way I implemented the...

How can I make my custom control fully clickable at designtime?

delphi,delphi-xe7
I created a custom control derived from TScrollingWinControl and from its constructor I create a new instance of another custom class derived from TGraphicControl. The controls works perfectly fine except at designtime. If I use the mouse to click on the scrollbox portion of the control, then the Delphi designer...

how do i get index of listview item where its subitem equal some string without using selected items?

delphi,listview,delphi-xe7
i currently use list view inside my project i wanted to get index of some item by finding its subitem string , i have listview with item and subitem , item caption := name and subitem := id i want to find the index of this item where sub item...

TCP socket - sending control characters

sockets,delphi,delphi-xe7
I am trying to connect by a TCP/IP protocol to a program that is not made in Delphi, and I have no documentation on how to do it. Using a service made in Delphi, I have monitored communication between two clients of the program, and write sendt text to a...

Delphi XE LiveBindings - Bits to Byte

delphi,bit-shift,delphi-xe7,livebindings
I just discovered livebindings with Delphi. And created my first components for handling a control-word for a frequency converter. The component it self seems to work well testing it in the form designer. However, compiling and running the application things doesn't work. Screenshot from livbindings like this: And here is...

Value of PixelsPerInch varying with windows themes?

delphi,winapi,delphi-2010,delphi-xe7
In windows 7 environment, the value of PixelsPerInch varies while switching between Win7 and classic themes. Strangely, while having the current windows OS active on a 150% scale, in Win7 theme PixelsPerInch returns a value of 96. The attached table will elaborate further....

How to execute a TTakePhotoFromCameraAction in other procedure on Delphi XE7?

delphi,firemonkey,delphi-xe7
I want to execute a TTakePhotoFromCameraAction in other procedure, but I can't. I Tested with TakePhotoFromCameraAction1.Execute, TakePhotoFromCameraAction1.ExecuteTarget,..., but without success. Is it possible?

How to make a component editor perform original handler on double click?

delphi,custom-controls,delphi-xe7
I've built a custom component editor (TComponentEditor) for a custom control of mine. I am implementing the right-click context menu, which means by default, double-clicking the control in design-time executes the first of the context menu items. However, upon double-click, I do not wish for this to happen. I would...

iOS Firemonkey: How to send email from iOS App though mail app in Firemonkey Delphi XE7

ios,delphi,email,firemonkey,delphi-xe7
I am working with iOS App in Firemonkey using Delphi XE7. Question: I need to send email from my iOS App through the mail app in Firemonkey. I have seen other old blogs for sending an email but those solutions didn't help me. Below are the old links which I...

Replace the icon of a VCL form with the icon of another .exe file at runtime?

delphi,icons,delphi-xe7
With Delphi XE7, I want to change the icon of the current VCL form (not of the application) at runtime. So I tried this code: procedure TForm1.LoadExeIcon(const AExeFileName: string); var Icon: TIcon; begin Icon := TIcon.Create; try Icon.Handle := ExtractIcon(HInstance, PWideChar(AExeFileName), 0); Self.Icon.Assign(Icon); finally Icon.Free; end; end; The changed icon...

Will the Kitkat application will run in Lolipop version

android,delphi,firemonkey,delphi-xe7
I'm using Delphi XE7 for developing android application. And for my mobile I'm having Kitkat version and recently got the lolipop version update, but i have not done. And in Delphi Xe7 I'm using the Kitkat version as the base package. Will i face any problem, if i'm updating my...

Receive WM_COPYDATA messages on Firemonkey form?

delphi,firemonkey,delphi-xe7
I am in the process of porting a Windows VCL application to Windows FMX (Firemonkey) in Delphi XE7, and have been stuck on this one issue... How do you receive messages such as WM_COPYDATA on a Firemonkey form? I have procedure WMCopyData(var msg: TWMCopyData); message WM_COPYDATA; in the protected part...

How can I pass a list of values as a parameter for a TOraQuery?

delphi,delphi-xe7
I have a TOraQuery with SQL defined something like this SELECT ML.ID, Ml.detail1, Ml.detail2 FROM MY_LIST ML WHERE ML.ID in (:My_IDS) If I was to build this query on the fly, I'd naturally end up with something like this: SELECT ML.ID, Ml.detail1, Ml.detail2 FROM MY_LIST ML WHERE ML.ID in (14001,14002,14003)...

Sending data from TIdTCPClient to TServerSocket in FMX is not working for Delphi XE8

delphi,indy,delphi-xe7,delphi-xe8
I'm using Delphi XE8 trail version for developing application mobile application. Currently I'm facing very critical problem below I have explained clearly. My Project is divided into two different applications: Application A: This application is developed using Delphi XE8 as VCL application. This application has the TServerSocket. And receives the...

How to check if a style file is already loaded?

delphi,delphi-xe7,vcl-styles
I have a ListBox that lists all style files (vsf) in a folder. When the user clicks a file, I load that style: if TStyleManager.IsValidStyle(sSkinFile, StyleInfo) then begin TStyleManager.LoadFromFile(sSkinFile); TStyleManager.SetStyle(StyleInfo.Name); end However, if the user clicks a style that was already loaded (was clicked previously), Delphi will rise and exception:...

Firemonkey XE7 app doesn't work on Android 5

delphi,firemonkey,delphi-xe7
I have an Firemonkey XE7 android App and it works perfect on Android 4.x But I tested it on Android 5 and it opens but after a while it closes. The only thing program do in that while is one simple ShowMessage(); and also making a file. I used the...

Converting FindScanline assembly code to purepascal

delphi,assembly,delphi-5,delphi-xe7
I am trying to convert some Delphi 5 code to Delphi XE7-x64 and I am stuck on following code: function FindScanline(Source : Pointer; MaxLen : Cardinal; Value : Cardinal) : Cardinal; assembler; asm PUSH ECX MOV ECX,EDX MOV EDX,EDI MOV EDI,EAX POP EAX REPE SCASB MOV EAX,ECX MOV EDI,EDX end;...

Memory Leak on TStringGrid's onDrawColumnCell event

delphi,memory-leaks,firemonkey,delphi-xe7,tstringgrid
Background: Windows 64-bit application, Firemonkey, Delphi XE7 I have about 10 TStringGrid components and all of which are using the same onDrawColumnCell to change cell colors when the Value in the cells is not 'Normal.' I am using the following code, but the severe memory leaks happens if the red...

How can I keep my application in the foreground?

android,delphi,firemonkey,delphi-xe7
Question: How do I keep my application in the foreground and/or prevent it from going to the background ever? I have created an application and managed to get it to automatically start when the device has booted. The purpose of the app is to show some data and never ever...

Detect if GPU supports Pixel Shader 2.0 at runtime (Firemonkey)

delphi,directx,firemonkey,delphi-xe7
This question comes from my previous question here: Delphi XE7 Abstract Error on StyleLookup with Effect (FireMonkey) Basically, I have several styled controls with effects applied. The effects work on most systems so I don't want to take them out of my styles all together for the select few customers...

How do I enumerate all string properties in an interface?

delphi,interface,delphi-xe7
I want (if possible) to enumerate all string properties in an interface that looks like this: IXMLDocumentSummaryType = interface(IXMLNode) ['{AD394EAD-1253-4CA5-9F0A-76122CB53D88}'] { Property Accessors } function Get_Uid: UnicodeString; function Get_RsUid: UnicodeString; //etc { Methods & Properties } property Uid : UnicodeString read Get_Uid write Set_Uid; property RsUid : UnicodeString read Get_RsUid...

Switching to Release Mode in Firemonkey

delphi,firemonkey,delphi-xe7
I have an Android Firemonkey app and I want to release it. But I can't switch to the release mode and the program runs in debug mode. I tried these : Changing configuration in Project Options (Top toolbar). Using Shift + Ctrl + F9 instead of F9. ...

Delphi TRibbon only loads after moving window

delphi,ribbon,delphi-xe7
I am creating a TControl application with a TRibbon for my job. I've created a ribbon before with no problems, but this one seems to be acting strange. I have dropped a TRibbon on to my form from the Tool Palette with four pages. There is no written code associated...

CreateOleObject in a 64-bit Delphi program?

delphi,ole,delphi-xe7
In a Delphi XE7 64-bit VCL program, the unit Vcl.OleAutocannot be found: [dcc64 Fatal Error] Unit1.pas(33): F1026 File not found: 'Vcl.OleAuto.dcu' While it works without problems in a 32-bit program: uses Vcl.OleAuto; ... FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); So how can I use CreateOleObject in a 64-bit program?...

Rounding error with TDateTime on iOS

sqlite,delphi,firemonkey,delphi-xe7
When calculating a 32bit ID from a timestamp (TDateTime), I get a strange error. In certain situations, the value is different on different processors. The fTimeStamp field is read from a Double field in a SQLite database. The code below calculates a 32bit ID (lIntStamp) from fTimeStamp, but in some...

How to extract only a specific value from a local JSON file?

json,delphi,delphi-xe7
I have a file info.json which contains only this code: {"personal": {"path": "C:\\My Directory", "honk": 82641923}} In Delphi XE7, how can I extract the path value, i.e. 'C:\My Directory'?...

Using FMX forms in a VCL application in XE7?

delphi,firemonkey,vcl,delphi-xe7
Even though it is not officially supported by Embarcadero there are many examples showing that you can include a FMX form in a VCL application e.g. MonkeyMixer and this SO question. However, when I create a test application with only one empty VCL form and one empty FMX form, I...

NPAPI plugin framework Error

delphi,npapi,delphi-xe7,browser-plugin
I am trying to use NPAPI Framework from Yury Sidorov by following this answer: How to embed Delphi VCL form into HTML page using NPAPI but I get an error with NPPlugin.pas. I am using delphi XE7 and here what i did by following Krom Stern instructions procedure DefDebugOut(const Msg:...

Delphi XE7 crashses at shutdown

delphi,delphi-xe7
Since I installed Delphi XE7 I have this nasty crash as shutdown: Description: Stopped working Problem signature: Problem Event Name: APPCRASH Application Name: bds.exe Application Version: 21.0.17707.5020 Application Timestamp: 545bd62d Fault Module Name: rtl210.bpl Fault Module Version: 21.0.17707.5020 Fault Module Timestamp: 545bd940 Exception Code: c0000005 Exception Offset: 00016a9c OS Version:...

Delphi XE7,Unicode display problems with PageProducer on WebBroker

delphi,unicode,delphi-xe7
I'm writing a multilanguage WebBroker application (for Apache 2.2) which display unicode encoded data from an oracle database. The same data with the same data-aware components (Devart's ODAC) in a test program written in Delphi XE7, are displaying correctly. My problem occured in the WebBroker where I'm facing with a...

VCL Styles breaks randomly

delphi,delphi-xe7,vcl-styles
I have a control derived from TMemo. It worked nice until I used for the first time with Delphi XE7 VCL Styles. Under Delphi XE7, styles are not applied to the scroll bars of the control. If dark theme/style is used, it looks horrible, while the scroll bars are silver....

How do I cast a TObject as a TObjectList?

delphi,generics,rtti,delphi-xe7
I have a procedure that needs to insert an array of TObjects into to a list. The list can be of any of the supported types, e.g. TObjectList, TObjectList<T>, TROArray, etc. The procedure looks like this: type TObjectArray = Array of TObject; ... procedure TMyClass.DoAssignObjectList(const ObjectArray: TObjectArray; const DstList: TObject);...

TJson.JsonToObject throws errors in a multi-thread enviroment

json,multithreading,delphi,rest,delphi-xe7
When using TJson.JsonToObject in a multi-thread environment random access violations occur. I was searching a long time for the problem and I could isolate it with the following code JSON class type TParameter = class public FName : string; FDataType : string; FValue : string; end; Testfunction: procedure Test(); var...

Change DES master key to AES in Mifare Desfire

android,encryption,nfc,delphi-xe7,mifare
I want to change DES master key to AES key on Mifare DESFire Ev1 cards. I am using Delphi (XE7) and I wrote our communication protocol in native commands. I have too completely datasheet (under NDA NXP). Could you write some steps or function, that I have to use? I...

Is there a way to turn off the Caption on a TDBRadioGroup

delphi,delphi-xe7
I have a TDBRadioGroup that I've added to my form. I'd really like to have the caption to the left of it instead of on top (the form's a little busy and tall, and I'm trying to squeeze it in). I can add my own label to the left of...

check if dbPlanner (TMS) item exists before copying

delphi,delphi-xe7,tms
To copy an event item in the dbPlanner I used the suggestion from the manual on TMS website: procedure TForm1.AdvGlowButton3Click(Sender: TObject); begin dbPlanner2.Items.Select(dbPlanner2.Items.Selected); dbPlanner2.Items.CopyToClipboard; dbPlanner2.SelectCells(dbPlanner2.SelItemBegin,dbPlanner2.SelItemEnd,dbPlanner2.SelPosition +1 ); end; But how do I check if the item to be copied exists in the first place ? If I click the button...

How do I include line breaks in an e-mail message created with ShellExecute?

delphi,mailto,delphi-xe7,shellexecute
I can successfully send an email with ShellExecute. The To address is correct, the Sender Address is correct, and the Subject is correct. The body of the email is correct, except there are no line breaks at all and everything appears as a single paragraph with no line breaks. The...

Component editor doesn't immediately prompt for saving new property values

delphi,ide,custom-controls,delphi-xe7
I have a custom control which has a component editor (two different screens available through two different context menu items). In both these instances, when I change properties of the component it's editing, the IDE does not acknowledge that any changes have been made, and thus the "Save All" button...

Error in ShellLink creation with negative IconIndex value

delphi,windows-shell,delphi-xe7
In Delphi XE7, I use this code to create a SHELL LINK pointing to a specific folder. This folder is displayed in Windows Explorer with a custom folder icon defined by a desktop.ini file inside this folder. The SHELL LINK should be created with the icon parameters found in the...

Decrease InternetOpenUrl timeout?

delphi,wininet,delphi-xe7
This function checks whether an URL can be reached or not: uses wininet, System.Types, ... function CheckUrl(url: string): boolean; var hSession, hfile, hRequest: hInternet; dwindex, dwcodelen: dword; dwcode: array [1 .. 20] of char; res: pchar; begin if pos('http://', lowercase(url)) = 0 then url := 'http://' + url; Result :=...