原理見http://202.38.73.222/~pjf/blog/archives/000040.Html 代碼如下: ============form1.dfm============== object Form1: TForm1 Left = 192 Top = 107 Width = 396 Height = 261 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate OnDestroy = FormDestroy PixelsPerInch = 96 TextHeight = 13 object Button1: TButton Left = 0 Top = 152 Width = 89 Height = 25 Caption = 'Load' TabOrder = 0 OnClick = Button1Click end object Memo1: TMemo Left = 0 Top = 0 Width = 385 Height = 145 ScrollBars = ssBoth TabOrder = 1 end object Button2: TButton Left = 0 Top = 184 Width = 89 Height = 25 Caption = 'Button2' TabOrder = 2 OnClick = Button2Click end object Button3: TButton Left = 120 Top = 184 Width = 89 Height = 25 Caption = 'Button3' TabOrder = 3 OnClick = Button3Click end end =========