新建一應用程序,在窗體上放置一個ListView控件和一個按鈕控件,然後粘貼以下代碼,代碼中的有關API和常量參考Windows單元,方法是按是Ctrl鍵,然後單擊鼠標左鍵
unit Unit1;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
ListView1: TListView;
Button1: TButton;