delphi-xe3

How could I fade in/out a TImage?

给你一囗甜甜゛ 提交于 2019-12-06 11:32:36
I have a simple TForm named Form1; Image1 which is a TImage loaded with a PNGImage and a Button1 TButton to test things. It was implemented sucessfully a method to AlphaBlend Image1's picture. Code follows: procedure SetPNGOpacity(Image : TImage; Alpha: Byte); var Bmp: TBitmap; BlendFn: TBlendFunction; PNG: TPNGImage; begin Png := TPngImage.Create; Png.Assign(TPNGImage(Image.Picture.Graphic)); Bmp := TBitmap.Create; Bmp.Assign(Png); Image.Picture.Bitmap.PixelFormat := pf32bit; Image.Picture.Bitmap.AlphaFormat := afPremultiplied; Image.Picture.Bitmap.Canvas.Brush.Color := clBlack; Image.Picture

Delphi XE3 indy compatibility issue between tbytes and tidbytes

北战南征 提交于 2019-12-06 10:49:50
I already saw post at Delphi XE4 Indy compatibility issue between TBytes and TidBytes about compatibility issues between the data types tbytes and tidbytes. From the second answer I learned, that it looks like they can't be used together even though they're both array of byte. However, the latest answer says, that in indy 10.5.9 it was dependent of the presence of TBytes, and that only in Indy 10.6 was it completely submitted as array of byte. Anyway,I have a .pas unit which decodes several packets from IdUDPServerUDPRead event, but can't get them together. I always get the error: [dcc32 Error

Fix VCL Styles Directory in Delphi XE3

拟墨画扇 提交于 2019-12-06 05:29:31
I have a problem about VCL Styles in Delphi IDE. When I change VCL Style From default style to another style in delphi IDE and run program an "Style 'Style Name' not found" error comes up. I trying to find a option in IDE to fix Style directory, but I can't find any options. Please, help me to solve this problem and fixing IDE Options. thanx a lot. oh, after a time, I found a way for solving this problem. for solving this problem must running the "redistsetup.bat" file. this file by default located in "C:\Program Files\Embarcadero\RAD Studio\10.0\Redist\redistsetup.bat". (^_^) I found I was

Blank lines instead of a task console output in MSBuild

故事扮演 提交于 2019-12-06 02:59:20
My product is being migrated from Delphi 6 to the newer Delphi XE3. The Delphi 6 compiler used to output list of files that were compiled to an executable: Borland Delphi Version 14.0 Copyright (c) 1983,2002 Borland Software Corporation ProjectName.dpr(X) ... PathToSomeUnit.pas(X) ... PathToSomeIncludedFile.inc(X) ... X lines, X.XX seconds, X bytes code, X bytes data. where "X" mean some numbers We have an internal software for analyzing dependencies between applications and particular files - units and included files. This software uses the dcc32 console output (like this one above) as its

TOpenDialog/NSOpenPanel not working in a sandboxed Delphi app

怎甘沉沦 提交于 2019-12-05 04:51:50
There seems to be a problem with the TOpenDialog in a Firemonkey application, which is sandboxed for the Mac Appstore. I use XE3, but it is also present in XE2. I actually found a QC report here, but it is still unresolved: http://qc.embarcadero.com/wc/qcmain.aspx?d=105344 Has anyone had the same problem, or any ideas how to work around it? It is very easy to check. Just put a TOpenDialog on a form and call the Execute method. Sign and sandbox the application according to the Embarcadero instructions: http://docwiki.embarcadero.com/RADStudio/en/Mac_OS_X_Application_Development When Execute is

Do generics in Delphi cause performance bottlenecks?

情到浓时终转凉″ 提交于 2019-12-05 02:07:28
Recently i have been developing an application and wanted to have a collections of several types. I don't want to declare and implement a new collection class for it's type. So, i thought of going with generics, but wasn't sure about the performance of Generics compared to normal typed instances. Performance is the major thing that i am looking at. My application is time critical and even loosing few 100 milliseconds is also not advisable. I am using Delphi XE3 For eg: ICollectionItem = interface function GetID : string; property ID : string read GetId; end; TGenericCollection<T:

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

Changing font of TActionMainMenuBar when using Vcl styles

偶尔善良 提交于 2019-12-04 11:17:09
Normally one could change the font of a TActionMainMenuBar or TMainMenu like this: Screen.MenuFont.Name := 'Calibri'; When using Vcl styles this isn't possible any more if a StyleHook is registered for the component. I went into the Bitmap Style Designer (formerly known as Vcl Style Designer) and changed the font for the MenuItemTextNormal . Problem is that changing the Font does nothing, I can only successfully change the Color of the text. Clearly I'm missing something here, why can I change the Color but not the Font? As you say changing the font of the MenuItemTextNormal element (or any

Stopping delphi program in an infinite loop

我是研究僧i 提交于 2019-12-04 07:59:38
When an indefinite loop occurs in Delphi, the debugger will not even give me a stack trace when I hit the stop button. If I have a suspicion of where the program is stalling, I can put a breakpoint and it will stop if that is the correct indefinite loop. Here is a sample program to deliberately cause an indefinite loop: procedure TForm1.btnDebugInfiniteLoopClick(Sender: TObject); var I: Integer; begin I:=0; while I<100 do begin I:=1+1; if I>64 then I:=I div 2; end; end; When stopped, I get something that looks like: ntdll.RtlUserThreadStart: 776301B4 89442404 mov [esp+$04],eax 776301B8

Microsoft AlwaysOn failover solution and Delphi

风格不统一 提交于 2019-12-04 07:12:34
I'm trying to make a Delphi application to work with AlwaysOn solution. I found on Google that I have to use MultiSubnetFailover=True in the connection string. Application is compiled in Delphi XE3 and uses TADOConnection . If I use Provider=SQLOLEDB in the connection string, application starts but it looks like MultiSubnetFailover=True has no effect. If I use Provider=SQLNCLI11 (I found on Google that OLEDB doesn't support AlwaysOn solution and I have to use SQL Native client) I get invalid attribute when trying to open the connection. The connection string is: Provider=SQLOLEDB.1;Password=