Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ListObj.pas
Package: delphi.rar [view]
Upload User: fh681027
Upload Date: 2022-07-23
Package Size: 1959k
Code Size: 2k
Category:
Delphi VCL
Development Platform:
Delphi
- unit ListObj;
- interface
- uses
- ComObj, ActiveX, StdVCL, Classes, Graphics, ListServ_TLB;
- type
- TListServer = class(TAutoObject, IListServer)
- private
- fItems: TStrings;
- fFont: TFont;
- protected
- function Get_Font: IFontDisp; safecall;
- function Get_Items: IStrings; safecall;
- procedure Set_Font(const Value: IFontDisp); safecall;
- procedure Set_Items(const Value: IStrings); safecall;
- public
- destructor Destroy; override;
- procedure Initialize; override;
- end;
- implementation
- uses
- ComServ, ListForm, AxCtrls;
- procedure TListServer.Initialize;
- begin
- inherited Initialize;
- fItems := TStringList.Create;
- fFont := TFont.Create;
- end;
- destructor TListServer.Destroy;
- begin
- fItems.Free;
- fFont.Free;
- inherited Destroy;
- end;
- function TListServer.Get_Font: IFontDisp;
- begin
- // get the form of the form
- fFont.Assign (ListServForm.Font);
- // convert it
- GetOleFont (fFont, Result);
- end;
- procedure TListServer.Set_Font(const Value: IFontDisp);
- begin
- // convert the font passed as parameter
- SetOleFont (fFont, Value);
- // apply it to the form
- ListServForm.Font.Assign (fFont);
- // force a refresh of the list box
- ListServForm.Listbox1.Invalidate;
- end;
- function TListServer.Get_Items: IStrings;
- begin
- // get the listbox items, converting them
- GetOleStrings (ListServForm.Listbox1.Items, Result);
- end;
- procedure TListServer.Set_Items(const Value: IStrings);
- begin
- // convert the strings received as parameter
- SetOleStrings (ListServForm.Listbox1.Items, Value);
- end;
- initialization
- TAutoObjectFactory.Create(ComServer, TListServer,
- CLASS_CoListServ, ciMultiInstance, tmSingle);
- end.