当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: program singletonTest; uses Fo
 

 

 ·delphi8里在vcl.net使用ado.net    »显示摘要«
    摘要: 在delphi.net中,vcl.net有两点蛮遗憾的:1.不能使用ado(dbgo),不过据李维说本月的delphi8.1将会有这个组件。2.不能使用ado.net和bdp,这将是我这片文章的主题。 在borland的delphi交流区内,曾经看到danny说过,"在delphi.net中vcl.net可以调用winform组件,同样winform也可以调用vcl.net组件"。 为了验证第一......
 ·delphi command-line compiler    »显示摘要«
    摘要: defproj.cfg__ default configuration which compiled by all projects defproj.dof__default configuration of all projects. delphi command-line compilerthe command-line compiler lets you invoke all the ......


设计模式之singleton

program singletontest;

【程序编程相关:数据库编程中界面与数据对象自动赋值的实现

uses 【推荐阅读:ShadowStar CodeFast

【扩展信息:2004.11.30.Using Sou

  forms,

  mainfrm in mainfrm.pas {form1},

  singletonfrm in singletonfrm.pas {form2};

{$r *.res}

begin

  application.initialize;

  application.createform(tform1, form1);

  application.run;

end.

unit singletonfrm;

interface

uses

  windows, messages, sysutils, variants, classes, graphics, controls, forms,

  dialogs, stdctrls;

type

  tform2 = class(tform)

    button1: tbutton;

    button2: tbutton;

    edit1: tedit;

    procedure button1click(sender: tobject);

    procedure formclose(sender: tobject; var action: tcloseaction);

    procedure button2click(sender: tobject);

    procedure formdestroy(sender: tobject);

    procedure formcreate(sender: tobject);

  private

    { private declarations }

  public

    { public declarations }

    selfptr:tform2;

    class function getinstanceptr:integer;

    class function getinstance:tform2;

  end;

var

  form2: tform2;

implementation

{$r *.dfm}


...   下一页
 ·第4部分 编译文件(第9页)    »显示摘要«
    摘要: 第4部分 编译文件(第9页) 一个更复杂的例子接下来展示的一个程序例子,被分割到了2个文件。一个工程文件,一个单元文件。你可以将工程文件保存为greeting.dpr,它看起来是这样的:program greeting;{$apptype console}uses unit1;beginprintmessage(hello world!);end.第一行说明了程序名称为greeting,又是......
» 本期热门文章:

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