delphi-xe5

Changing Delphi XE5 workspace to Delphi 7

随声附和 提交于 2019-12-04 06:00:31
问题 Is it possible to change XE5's workspace to Delphi 7 like? Designing Forms inside a window is really pain and i would like to move components palette to up and design form outside of a canvas. 回答1: You can switch to the Classic Undocked desktop in the desktop drop down. It's not identical to Delphi 7, but it is possibly as close as you'll get out of the box. The other thing you can try is to enable the floating designer, disabled by default. More details here: http://francois-piette.blogspot

How to find Resolution under Delphi XE5

↘锁芯ラ 提交于 2019-12-04 04:19:45
I started to develop a game under Delphi XE5 for iOS. I have problem with the Resolution feature of the Firemonkey. When I open the screen and I check resolution on the iPhone I get 320x480. But the native resolution of the iPhone 4 and 5 is doubled. I found at official Delphi pages that FireMonkey is recalculating the screen by "Resolution" which is for Retina display 2. I think this is cool feature for regular apps, but when you start to do game and you want to manipulate with images by code it brings weird situations. My question is - is there way to find the actual Resolution value or at

How to modify delphi property Getter/Setter with RTTI?

末鹿安然 提交于 2019-12-04 03:59:02
问题 I would like to replace the getter/setter for properties using RTTI. I know that you can access the getter setter with TPropInfo.SetProc/GetProc and I know that these fields points to different data depending if the property uses virtual methods, direct field access or static methods. I'm interesting on replacing propertiy setters/getters that point to virtual methods with custom virtual methods. TRttiInstanceProperty(RttiProperty).PropInfo^.SetProc := ? // SomeOtherInstance.Setter

What is the difference between “Limited Debugging Information” and “Debug Information” in Delphi XE5 compiling setting

﹥>﹥吖頭↗ 提交于 2019-12-03 23:39:11
Delphi XE5 compiler for Win32 has new setting for Debug Information: Limited Debugging Information . What is the difference between Limited Debugging Information and Debug Information ? Some compilers provide variants of the debug flag that provide different levels of debugging information and optimization. Depending on the options you use when compiling and linking your program, the debugging information available in the program's executable file may range from full to nonexistent. Programs that include shared libraries or other code modules may contain limited debugging information

How to work with 0-based strings in a backwards compatible way since Delphi XE5?

你说的曾经没有我的故事 提交于 2019-12-03 15:23:13
问题 I'm trying to convert my current Delphi 7 Win32 code to Delphi XE5 Android with minimal changes, so that my project can be cross-compiled to Win32 from a range of Delphi versions and Android from XE5. Starting from XE5 there are breaking changes in language aimed at future. One of such changes is zero-based strings. In older versions with 1-based strings the following code was correct: function StripColor(aText: string): string; begin for I := 1 to Length(aText) do but now this is obviously

Hide process window with 'CreateProcess'

南笙酒味 提交于 2019-12-03 14:27:49
I'm using a procedure provided to me that'll run a process but I want the process to be run in the background without the window showing up. The call is ExecProcess(ProgPath, '', False); and the function is function ExecProcess(ProgramName, WorkDir: string; Wait: boolean): integer; var StartInfo: TStartupInfo; ProcInfo: TProcessInformation; CreateOK: boolean; ExitCode: integer; dwExitCode: DWORD; begin ExitCode := -1; FillChar(StartInfo, SizeOf(TStartupInfo), #0); FillChar(ProcInfo, SizeOf(TProcessInformation), #0); StartInfo.cb := SizeOf(TStartupInfo); if WorkDir <> '' then begin CreateOK :=

How do I open URLs, PDFs, etc. with the default apps?

天大地大妈咪最大 提交于 2019-12-03 12:10:28
I am developing an Android application with Delphi XE5, and I would like to know how I can open a URL in the default browser, and a PDF file with the default reader. Developing for Windows, I used ShellExecute , but for Android and iOS what should I use? For these kind pf task you can use the Intent class which is represented in Delphi by the JIntent interface. Try these samples Open a URL uses Androidapi.JNI.GraphicsContentViewText, FMX.Helpers.Android; procedure TForm3.Button1Click(Sender: TObject); var Intent: JIntent; begin Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass

faster alternative to InttoStr/StrToInt?

你离开我真会死。 提交于 2019-12-03 07:52:40
问题 I wonder if there are faster alternative than System.IntToStr / System.StrToInt . There is a fast version but only UTF8. Which is Int32ToUTF8 from SynCommons.pas and due to slow string conversions it is bound to be slow. The purepascal RTL versions are really slow for 64 bit. 回答1: This routine is approximately 40% faster than the routine in the RTL. It could be much faster if you worked with WideChar[] buffers because the string allocation is taking up 75% of the time used by the conversion

How to work with 0-based strings in a backwards compatible way since Delphi XE5?

◇◆丶佛笑我妖孽 提交于 2019-12-03 04:58:32
I'm trying to convert my current Delphi 7 Win32 code to Delphi XE5 Android with minimal changes, so that my project can be cross-compiled to Win32 from a range of Delphi versions and Android from XE5. Starting from XE5 there are breaking changes in language aimed at future. One of such changes is zero-based strings. In older versions with 1-based strings the following code was correct: function StripColor(aText: string): string; begin for I := 1 to Length(aText) do but now this is obviously not right. Suggested solution is to use: for I := Low(aText) to High(aText) do This way XE5 Win32

Correctly using TAniIndicator in firemonkey mobile dev for wait for processing

社会主义新天地 提交于 2019-12-03 04:41:00
问题 I am using Delphi XE-5 (Firemonkey Mobile Application) I am trying to get the TAniIndicator to work, by displaying during my long processing. I have a TAniIndicator (AniIndi) on my main form, but it does not spin. It displays correctly, but does not spin. begin Loading:= True; AniIndi.Visible:= True; AniIndi.Enabled:= True; UpdateAll; Application.ProcessMessages; //do my processsing here Loading:= False; AniIndi.Enabled:= False; AniIndi.Visible:= False; UpdateAll; Application.ProcessMessages;