Under the open a project in the form of "Error creating form: Unable to Replace Image"
Code about this
The unit CardWizard;
Interface
USES the
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ActnList ExtCtrls, jpeg.
Type
TfrmCardWizard=class (TFrame)
BtnActIssueCard: TSpeedButton;
BtnActBatIssueCard: TSpeedButton;
BtnActFullMoney: TSpeedButton;
BtnActReIssueCard: TSpeedButton;
BtnActReturnOldCard: TSpeedButton;
BtnActBrowseCard: TSpeedButton;
BtnActReturnMoney: TSpeedButton;
BtnActLossCard: TSpeedButton;
BtnActChangeRec: TSpeedButton;
BtnOutCardRecord: TSpeedButton;
ImgBack: TImage;
Private
{Private declarations}
Public
{Public declarations}
The constructor Create (AOwner: TComponent); Override.
end;
Implementation
USES Functions provides VarUnit;
{$R *. DFM}
{TfrmxxxWizard}
The constructor TfrmxxxWizard. Create (AOwner: TComponent);
The begin
Inherited;
end;
Initialization
RegisterClass (TfrmxxxWizard);
Finalization
UnRegisterClass (TfrmxxxWizard);
End.
The error is can't replace speedButton useful to the picture in picture form
Images (presumably) manually added in the Glyph attribute
Executed, but when the program execution to properly when the form can also be called normal, normal display, is only the other no problem form the project error (runtime) "Unable to Replace the Image"
For help,
CodePudding user response:
Call the form code:,,,,,,
FrameClass:=TFrameClass (FindClass (FrameClassName));
FFrame:=FrameClass. Create (self);//shown here Unable to Replace the Image
,,,,,,,
CodePudding user response:
At the error message might be bigger is the Replace ImageList components, ReplaceIcon, ReplaceMasked three methods, can screen, such as the resolution of the image, size or other reasons,CodePudding user response:
Create a window, the Image to be replaced,Advice,
1, in the window, delete Image, to add Image, through the Glyph to join an Image, as well as the parameters,
2, OnCreat or OnShow event, check the Tmage read in graphic code,