vcl

How to control/remove borders of embedded chm help file in delphi windows/vcl application?

ぐ巨炮叔叔 提交于 2019-12-12 04:57:07
问题 I've got a Delphi Windows/VCL (XE7) program that embeds CHM help pages in various panels of the program. This largely works fine but the panels always shows an ugly recessed border (looks very windows 95). Here is a screenshot: Does anyone know how to display the help files with no border? Below is the code I use at the moment. Thanks for any help! Procedure DoShowEmbeddedHelp(TheWinName: string; ThePanel: TPanel; var HelpWinHandle: integer; HelpTopic: string; var LastTopic: string; ByContext

Delphi/C++Builder TBitmap: How to determinine scanline order?

…衆ロ難τιáo~ 提交于 2019-12-12 03:48:48
问题 Delphi's TBitmap type is basically a wrapper over a GDI BITMAP and PALETTE, and can support both top-down and bottom-up scanline ordering. I have a TBitmap which I need to convert to GDI+ Bitmap, in order to rotate and composite it. My bitmap is 32-bit ARGB, which windows supports, but VCL doesn't natively 'understand'. TBitmap *bmp; ... When I use the following constructor, the alpha channel doesn't work for compositing, but otherwise everything works. Gdiplus::Bitmap b(bmp->Handle, NULL);

FMX form in VCL app via TFireMonkeyContainer - application freezing

萝らか妹 提交于 2019-12-12 03:36:42
问题 I'm using the TFireMonkeyContainer control to embed a Firemonkey form inside a VCL application. Initially, everything works fine. However, whenever I do something which triggers a TChangeTabAction (to slide back and forth between tabs in a TTabControl ), the entire application freezes up and stops responding. Even Windows is unable to detect that it's not responding - the title bar is even frozen as well, and I have to either terminate the process from the IDE or from the Task Manager. The

TStringGrid with SpeedButtons

。_饼干妹妹 提交于 2019-12-12 02:45:02
问题 I want to have a button with icon at the end of each row. Like here: I tried this procedure TMyFrame.sgrd1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var canvas: TCanvas; sgrd: TStringGrid; point: TPoint; btn: TSpeedButton; begin sgrd := TStringGrid(Sender); canvas := sgrd.Canvas; canvas.FillRect(Rect); if (ACol = 1) then begin point := Self.ScreenToClient(ClientToScreen(Rect.TopLeft)); btn := TSpeedButton.Create(sgrd); btn.Parent := sgrd; btn.OnClick :

TeeChart X Axis Label Formatting

こ雲淡風輕ζ 提交于 2019-12-12 00:55:28
问题 I’ve got my TeeChart looking pretty good, the grid lines / ticks appear where I wish and so forth (the X Axis LabelStyle is set to talAuto). Now I need to format the X Axis labels so they display a time offset rather than the data point number. I’ve changed the LabelStyle to talMark and am handling the chart’s OnGetAxisLabel. The problem is that my event handler is called for every X Axis point rather than just the points which displayed labels when I had LabelStyle set to talAuto. How can I

How to make a splash screen with a progress bar on Turbo Delphi?

好久不见. 提交于 2019-12-11 16:00:10
问题 (Unit1.pas) unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls,unit2; type TForm1 = class(TForm) Button1: TButton; Label1: TLabel; Timer1: TTimer; procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } procedure OpenSplash; procedure ShowProgress; procedure CloseSplash; end; var Form1: TForm1; X: Integer; Total: Integer; Percent: Integer; implementation {$R *.dfm}

DELPHI - How to change a TButton background color in a VCL Form Application?

丶灬走出姿态 提交于 2019-12-11 13:07:46
问题 In my Delphi VCL Form Application I have to change the background color of a TButton. Is there a way to apply this change without using a third-party components? Thanks. 回答1: You can't change the color of a TButton component directly, instead you must use a third-party component or owner draw the button (BS_OWNERDRAW). 来源: https://stackoverflow.com/questions/15664495/delphi-how-to-change-a-tbutton-background-color-in-a-vcl-form-application

Issues changing form's type to a custom base form type

◇◆丶佛笑我妖孽 提交于 2019-12-11 10:55:57
问题 I have a number of existing forms which I need to convert to inherit from another base form TfrmBase instead of the normal TForm . This base form is a TForm with a little added functionality. All I do to convert them is... add the base form's unit to the uses clause change class(TForm) to class(TfrmBase) . When I run the application, the FormCreate even is executed successfully, but when it comes to showing this form (application's main form), I get an exception: Class TPanel not found I do

How to get the items and subitems in a listview?

有些话、适合烂在心里 提交于 2019-12-11 10:44:34
问题 I want to get all items and subitems in my listview,but all I get is "TlistItem" Here's my code: procedure TFrameAnalyzer.AddEntry(opcode:word;data:Array of byte;direction:byte); begin MessageBox(0,PChar(sListView1.Items.Item[4].ToString),'',0); end; How do I get the name of the item as string and the name of it's 2 subitems? 回答1: You can't get the name of the item, because it has no name. It has a Caption though, and a SubItems property of type TStrings . All of this can easily be found in

How to setup a TIcon instance to support alpha channel icons (SupportsPartialTransparency)

泪湿孤枕 提交于 2019-12-11 10:39:50
问题 Using Borland C++ Builder 2009 I notice that when replacing images in a TImagelist, the alpha channel data gets corrupted somehow. TIcon *Icon = new TIcon() ; for (int x = 0 ; x < OS_Specific_count ; x++) { OS_xx_ImageList->GetIcon(x, Icon) ; Use_ImageList->ReplaceIcon(x, Icon) ; } delete Icon ; The problem is also described (+screenhots) in another Q ( TImageList - True color + alpha channel vs. 8-bit (256 colors) ) but I'm now trying to narrow things down with more specific questions. While