BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to streamize custom property in ActiveX form

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
walkingboy
Guest





PostPosted: Fri Jul 25, 2003 5:07 am    Post subject: how to streamize custom property in ActiveX form Reply with quote



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





PostPosted: Fri Jul 25, 2003 6:49 am    Post subject: Re: how to streamize custom property in ActiveX form Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.