delphi-xe7

form:Transparent, Control on form:non Transparent?

若如初见. 提交于 2019-12-04 16:46:25
How can change alphablend of a form without affect on control in form? Delphi XE7 One solution to this problem is to use Multi-Device Application (if using VCL is not possible). If you need to leave a transparent TForm just changing a property Transparency = True . If you need to leave a semi-transparent component, all components have the Opacity property that can be assigned a more transparent value between 0 and 1, where 0 is closer to that component. For example you could put the controls within a TLayout and change the Opacity of it as you see fit, and have no effect on the other

How to use StackAlloc in x64?

廉价感情. 提交于 2019-12-04 12:36:54
问题 I am trying to use StackAlloc from Graphics32 in DelphiXE7 in X64 however it crashes with erorr. I tried adding NOFRAME to the code and that didn't help either. First chance exception at $000000000013FF10. Exception class $C0000005 with message 'c0000005 ACCESS_VIOLATION'. Process Stack.exe (4536) program Stack; {$APPTYPE CONSOLE} uses System.SysUtils, System.Classes; function StackAlloc(Size: Integer): Pointer; register; asm {$IFDEF CPUX86} POP ECX // return address MOV EDX, ESP ADD EAX, 3

how do i work with showmodal in FMX?

≯℡__Kan透↙ 提交于 2019-12-04 06:08:26
问题 i am trying to create a login form to my main android form, so i do something like this var CanGo: Boolean; begin Application.Initialize; Application.CreateForm(TForm1, Form1); loginfrm := Tloginfrm.Create(nil); try loginfrm.ShowModal; CanGo := loginfrm.LoginSuccess = true; finally FreeAndNil(loginfrm); end; if CanGo then Application.Run; end. i been doing this in win32 application and its working just fine , when i try to do the same way on android application stopped on touchscreen and wont

How to get the data from a ShellLink even when the Link Target does not exist anymore?

天涯浪子 提交于 2019-12-04 05:39:22
问题 In Delphi XE7, I wanted to use the following code to replace the link target of a shell link file (.lnk), even when the link target does not exist anymore: uses JclShell; ... procedure ShellLinkReplaceLinkTarget(const AShellLinkFile, ANewTarget: string); var ThisShellLink: JclShell.TShellLink; begin if (JclShell.ShellLinkResolve(AShellLinkFile, ThisShellLink, SLR_ANY_MATCH or SLR_NO_UI) = S_OK) then begin ThisShellLink.Target := ANewTarget; JclShell.ShellLinkCreate(ThisShellLink,

Delphi conditional compilation in uses clause

痴心易碎 提交于 2019-12-04 00:23:00
问题 I am trying to modify my Delphi 2010 code to compile in XE7 (and want to retain the ability to compile it in 2010). So in the unit that houses my mainform I added conditional directives. The following works fine in 2010 uses {$IF CompilerVersion >= 24}System.Actions, {$ELSE}Actnlist,{$IFEND} Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; But XE7 automatically adds a System.Actions at the end to create a uses clause that now has System.Actions declared twice (see

TJson.JsonToObject<T> throws errors in a multi-thread environment

戏子无情 提交于 2019-12-03 23:26:38
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 myTasks: array of ITask; i : integer; max : integer; begin max := 50; SetLength(myTasks, max); for i := 0 to max -1 do begin myTasks[i] := TTask.Create(procedure () var json : string; p : TParameter; begin json := '{"name":"NameOfParam","dataType":"TypeOfParam","value":

Where is TShellTreeView?

扶醉桌前 提交于 2019-12-03 23:03:54
问题 I'm trying to compile an old project in Delphi 10 Seattle and get the following error message class TShellTreeView not found click cancel to ignore..... TShellTreeView is a design-time component, part of the ShellCtrls package, that always shipped with Delphi in the Samples packages typically found in : C:\Users\Public\Documents\Embarcadero\Studio\xx.x\Samples\Object Pascal\VCL\ Now it doesn't seem to be there anymore. Where did this package go? 回答1: The ShellControls design-time package,

How to improve multiple StringReplace calls?

筅森魡賤 提交于 2019-12-03 20:17:25
I read files from customers and I need to process the read data and remove some unneeded characters. My function works, but I'm trying to improve the FixData function to improve speed/performance and maintainability. Is it possible to replace multiple StringReplace calls with something that will only loop through data once and replace with whatever it needs to? I can't find MultipleStringReplace or similar function. MCVE: function FixData(const vStr:string):string; var i:integer; begin Result:=vStr; // empty string if Result = #0 then Result := ''; // fix just New line indicator if Result =

Delphi Android Solution / ARM7 with NEON marketshare? [closed]

依然范特西╮ 提交于 2019-12-02 23:45:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . When developing an app for Android using Delphi I need to know the market share it supports (for a customer) The version requirements is okay ~roughly 99% af active phones: http://en.wikipedia.org/wiki/Android_version_history But what is the marketshare of current Android telehpones in current use (or sold the

How to detect 32/64 platform?

痴心易碎 提交于 2019-12-02 20:30:00
问题 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. 回答1: The code that you present in the question has a few wrinkles, but it does work correctly. I suspect that you are not actually running that code, and have made an error and somehow posted the wrong code. FWIW, you should use TOSVersion from System.SysUtils to check the bitness of the underlying platform. The