当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: : 9pt; COLOR
 

 

    摘要:如何写出象ttable, tadotable ,tquery,tadoquery 等控件一样的自动下拉显示field属性delphi vcl在delphi 中有很多源码,但是有些关键的属性编辑器却找不到,下面我将举几个例子来说明一下我们可以研究一下tdbedit的两个关键属性一个datasource,datafield.示例如下ttestcontrol=class(twincontrol) pri......
    摘要:unit yaohaoqiu;interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, spin;type tform1 = class(tform) button1: tbutton; spinedit1: tspinedit; spine......


Delphi下的接口编程学习笔记(原创)

 delphi下的接口编程  delphi下的接口编程学习笔记1.1  为什么使用接口?    举个例子好了:有这样一个卖票服务,电影院可以卖票,歌剧院可以卖票,客运站也可以卖票,那么我们是否需要把电影院..歌剧院与客运站都设计成一个类架构以提供卖票服务?要知道,连经理人都可以卖票,很显然不适合把经理人也包括到卖票服务的继承架构中,我们需要的只是一个共通的卖票服务.于是,卖票的服务是个接口,电影院.歌剧院什么的只要都遵循这样一个服务定义就能很好地相互交互与沟通(如果须要的话).     1.2  如何在delphi中使用接口        1.2.1  声明接口            imyinterface = interface(iinterface)  //说明(1)            [{63e072df-b81e-4734-b3cb-3c23c7fda8ea}]  //说明(2)                function getname(const str: string): string; stdcall;                 function queryinterface(const iid: tguid; out obj): hresult; stdcall; //说明(3)                function _addref: integer; stdcall;  //使接口引用数加1.                function _release: integer; stdcall;//使接口引用数减1,当小于等于0时作释放动作.            end;                        说明(1):如果有继续关系则在括号里填父接口,否则省却,如:imyinterface = interface这样就行.
...   下一页

 ·bpl和dll文件的区别[翻译]     »显示摘要«
    摘要:[原文] that is correct. a bpl is a dll. (but not all dlls are bpls.) > but i still found some different, such as that i can create a > object from the host exe and that pass to a bpl and modify it......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE