delphi-xe3

Multiple statements Delphi TZquery (Zeos) error

会有一股神秘感。 提交于 2019-12-10 16:04:08
问题 im trying to make a multiple statement query like this : // without the second insert the query works fine. // i need 2 querys to work because later, i'll do inserts on different kind of tables. // that's why i need 2 querys, not a single query which insert 2 records. with ZQuery1 do begin SQL.Clear; SQL.Add('insert into client (name,age) values ('+QuotedStr('john')+','+QuotedStr('20')+');'); SQL.Add('insert into client (name,age) values ('+QuotedStr('doe')+','+QuotedStr('21')+');'); ExecSQL;

Building and evaluating expressions using Delphi RTTI

断了今生、忘了曾经 提交于 2019-12-10 12:18:58
问题 I am faced with a task of allowing the user to define the expressions using the compiled classes with RTTI enabled. Let me put it in a simple way. TAnimal = class(TPersistent) private fWeight : Double; fHeight : Double; fName : string; published property Weight : Double read fWeight write fWeight; property Height : Double read fHeight write fHeight; property Name : string read fName write fName; end; And i have a routine which will evaluate the animal with the supplied expression function

How to enable Alpha leveling in TImage graphic?

偶尔善良 提交于 2019-12-10 12:12:30
问题 I have TImage with a preloaded Bitmap (by PNGImage unit) with an Alpha Channel: The subject is the Great Green Dino. I wanted to be able to change its Alpha Level in runtime, to any value in the range. Like 127 and he would look like this: Following the answer to another similar question I almost felt in the skin it would work. But that was the result to Alpha Level 0 for example: So, my question. Could someone know how to improve the answer's routine? Or know another way to achieve the

TOpenDialog/NSOpenPanel not working in a sandboxed Delphi app

最后都变了- 提交于 2019-12-10 03:56:18
问题 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

Changing font of TActionMainMenuBar when using Vcl styles

邮差的信 提交于 2019-12-09 18:36:18
问题 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

Grid Scroll Behind Modal Window

和自甴很熟 提交于 2019-12-09 06:50:27
I have built a MCV of this problem, and I'm happy to upload it. I'll try to describe the problem first. Create a main window and place a TDBGrid connected to a table through any database available. OnShow of the window connect to the database and open the table. Create a button on the main window that launches a non-modal window. On the non-modal window create a button that launches a modal window. Follow these steps carefully to replicate the problem. Run the application. Put focus into the grid and use your mouse wheel to scroll up and down. Press the button to launch the non-modal window.

Delphi XE3 and TChromium

天涯浪子 提交于 2019-12-08 08:21:38
问题 Make out the work with a component in Delphi XE3 TChromium need to get to the content of the page is loaded forums found examples of working code: procedure DoWork (const doc: ICefDomDocument); var q: ICefDomNode; begin q: = doc.GetElementById ('q'); if Assigned (q) then q.SetElementAttribute ('value', 'Hello, world'); end; procedure actDomExecute; var q: ICefDomNode; begin crm.Browser.MainFrame.VisitDomProc (DoWork); end; But the debugger somehow bypasses execution of an obstinately DoWork.

Media player as windows service

懵懂的女人 提交于 2019-12-08 08:17:45
问题 I've been looking for info for a while now but haven't been able to find anything useful for us. We're building kind of a SmartCar complex system, which controls more or less everything in a car.. Its a dev project, nothing "reinventing the wheel" here, just the point of doing it completely from the scratch. Since it's going to have quite a heavy load, we built a PC based on i5 proc with 8GB of ram, running Windows Server 2012 Datacenter on Intel's S335 SSD hard drive. So far so good, the

How could I fade in/out a TImage?

巧了我就是萌 提交于 2019-12-08 02:53:38
问题 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

Blank lines instead of a task console output in MSBuild

混江龙づ霸主 提交于 2019-12-07 13:00:04
问题 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