delphi-xe3

TActionMainMenuBar, VCL-Styles and MDI buttons(Minimize, Close etc) not being styled.

血红的双手。 提交于 2019-12-21 04:39:19
问题 I'm trying to make TActionMainMenuBar display styled MDI buttons like a TMainMenu does. Any suggestions? I can't stop using MDI for this project. 回答1: Ok, first this is not a Vcl Styles bug , this is a VCL bug. This issue appears even if the Vcl Styles Are disabled. The issue is located in the TCustomMDIMenuButton.Paint method which uses the old DrawFrameControl WinAPi method to draw the caption buttons. procedure TCustomMDIMenuButton.Paint; begin DrawFrameControl(Canvas.Handle, ClientRect,

Delphi XE2 RTTI broken?

左心房为你撑大大i 提交于 2019-12-20 10:01:12
问题 I recently migrated from D2010 to DXE2 and found a showstopper bug (Or feature?) in XE2 and XE3 (Tested in my friend XE3) related to RTTI generation for TBytes fields inside classes. I found that the RTTI information for a TBytes variable inside a class is never generated. The following code works well in D2010, but shows the message "Error" in XE2/XE3 Does anyone have any clue? This will totally break all our software data serialization implementation To test the code please add Rtti unit to

Delphi XE2 RTTI broken?

本小妞迷上赌 提交于 2019-12-20 10:00:14
问题 I recently migrated from D2010 to DXE2 and found a showstopper bug (Or feature?) in XE2 and XE3 (Tested in my friend XE3) related to RTTI generation for TBytes fields inside classes. I found that the RTTI information for a TBytes variable inside a class is never generated. The following code works well in D2010, but shows the message "Error" in XE2/XE3 Does anyone have any clue? This will totally break all our software data serialization implementation To test the code please add Rtti unit to

How to copy a locked file like .pst using delphi xe3

徘徊边缘 提交于 2019-12-20 06:27:02
问题 I am struggling to find an answer to the following problem. Any and all help would be appreciated. I am using the following code to try and copy an outlook.pst file while outlook is open. And i cannot get it to succeed. It does not give an error, it just doesnt copy the file. copyfile('C:\Users\Administrator\Documents\Outlook Files\Outlook.pst','F:\Outlook.pst'); If you guys know how i will be able to copy a locked file like that please assist. I have tried and found that TFilestream also

How to parse specified value from JSON object in Delphi XE3?

半腔热情 提交于 2019-12-19 03:17:19
问题 My JSON object looks like this: { "destination_addresses" : [ "Paris, France" ], "origin_addresses" : [ "Amsterdam, Nederland" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "504 km", "value" : 504203 }, "duration" : { "text" : "4 uur 54 min.", "value" : 17638 }, "status" : "OK" } ] } ], "status" : "OK" } I will need the "504 km" value from distance. How can i do this? 回答1: You can use the DBXJSON unit, included since Delphi 2010. Try this sample uses DBXJSON; {$R *.fmx} Const

How to stop the automatic scrolling of a Memo control?

不打扰是莪最后的温柔 提交于 2019-12-19 02:52:11
问题 In Windows 7, a memo control ( TMemo ) will scroll automatically after text is insterted ( Memo.Lines.Add(Path); ), which I do not want, because scrolling is done by myself. How can I stop the automatic scrolling? 回答1: Normally, adding text to a memo control scrolls the memo to the bottom of the inserted text. To prevent that, call Lines.BeginUpdate before adding text, and call EndUpdate afterwards: procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.BeginUpdate; try Memo1.Lines

How do you style the non-client area in a Firemonkey FM2 application in Delphi XE3

独自空忆成欢 提交于 2019-12-18 13:28:33
问题 I previously asked this question in the Delphi XE2 timeframe, and the answer then was a pretty ugly hack. Now Delphi XE3 supports non-client theming, according to the official release notes. How do you do it in Delphi XE3 in Firemonkey FM2? I believe it must be something to do with the style-book, but I can't figure it out. The form itself has an "EnableBorderStyling" property which I set to true, and I am thinking I must have to load a style that contains some nonclient theme data, but I can

Delphi IDE is not visible

妖精的绣舞 提交于 2019-12-14 04:18:25
问题 I double click the Delphi icon on the desktop , but the IDE does not show up. Looking into the Task Manager list, the BDS.exe appears under the Processes list, while it should appear under the Applications list. Has anyone any idea why this is happening? Note: the IDE version I'm currently using is XE3 , but the 2010 version, wich is also installed, behaves the same way. Windows version is 8.1 . I really appreciate any help. 回答1: Often this happens because you've got either a poorly behaving

How to drag a borderless FMX form on the screen through another object?

南楼画角 提交于 2019-12-13 19:15:46
问题 I am trying to make a form draggable on the screen, i.e. that I could grab it and move it around the screen. Its transparent and has no borders, however an image serves to be the background for other controls. I want to use the image's events to control dragging of the form. How can I do that? I have found the DragEnter, DragLeave, DragStart methods which have this TDragObject argument, I don't know about. Can somebody help? 回答1: Basically you have to do it manually. Here's some delphi

Creating a custom caption bar and border at runtime, TMainMenu acting up

坚强是说给别人听的谎言 提交于 2019-12-13 13:26:31
问题 I'm working on a rather large project that uses custom forms and would like to draw the non-client area of these forms myself. I can't use vcl-styles because many of the forms need to have a caption bar and border in a color picked at run time and as far as I know, styles are application wide by design. What I have accomplished so far is drawing the caption bar and border, drawing on the caption, disabling the minimize, maximize and close buttons and replacing them with my own. I achieved