 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
walkingboy Guest
|
Posted: Fri Jul 25, 2003 5:07 am Post subject: how to streamize custom property in ActiveX form |
|
|
hello everyone,
i create an activex form by delphi, and i use Type library editor define
some custom properties. these properties can be found in object inspector
,but these properties are not persistent ,that is ,they cannot be stream in
dfm file.
if somebody can give me advice ,thank you advance.
in Type library editor, i define a property called mvItemListID, source code
is as follows ,
type
TActiveFormX = class(TActiveForm, IActiveFormX)
private
{ Private declarations }
FmvItemListID:integer;//****this is my own Field
FEvents: IActiveFormXEvents;
procedure ActivateEvent(Sender: TObject);
procedure ClickEvent(Sender: TObject);
procedure CreateEvent(Sender: TObject);
procedure DblClickEvent(Sender: TObject);
procedure DeactivateEvent(Sender: TObject);
procedure DestroyEvent(Sender: TObject);
procedure KeyPressEvent(Sender: TObject; var Key: Char);
procedure PaintEvent(Sender: TObject);
protected
{ Protected declarations }
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
override;
procedure EventSinkChanged(const EventSink: IUnknown); override;
function Get_Active: WordBool; safecall;
function Get_AlignDisabled: WordBool; safecall;
function Get_AutoScroll: WordBool; safecall;
function Get_AutoSize: WordBool; safecall;
function Get_AxBorderStyle: TxActiveFormBorderStyle; safecall;
function Get_Caption: WideString; safecall;
function Get_Color: OLE_COLOR; safecall;
function Get_Cursor: Smallint; safecall;
// ......... there are many lines
procedure Set_Visible(Value: WordBool); safecall;
//**** the following 2 lines is my code
function Get_mvItemListID: Integer;safecall;
procedure Set_mvItemListID(Value: Integer);safecall;
public
{ Public declarations }
procedure Initialize; override;
end;
function TActiveFormX.Get_mvItemListID: Integer;
begin
Result:= FmvItemListID;
end;
procedure TActiveFormX.Set_mvItemListID(Value: Integer);
begin
FmvItemListID:=Value;
end;
|
|
| Back to top |
|
 |
walkingboy Guest
|
Posted: Fri Jul 25, 2003 6:49 am Post subject: Re: how to streamize custom property in ActiveX form |
|
|
i build this activex Form as an OCX control. in another project i place this
ocx control in a form ,and i set property "mvItemListID " in object
inspector. but the value of "mvItemListID" cannot be save in dfm file.
please help me .
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|