东
东兰梦舞
Unregistered / Unconfirmed
GUEST, unregistred user!
我又来一个,还是不用消息,呵呵,这回点MOUSE也可以[]<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Edit1: TEdit;<br> Edit2: TEdit;<br> Edit3: TEdit;<br> ListBox1: TListBox;<br> private<br> FLastActive: TWinControl;<br> public<br> function SetFocusedControl(Control: TWinControl): Boolean; override;<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>function TForm1.SetFocusedControl(Control: TWinControl): Boolean;<br>begin<br> inherited SetFocusedControl(Control);<br> if Assigned(FLastActive) then<br> ListBox1.Items.Append(FLastActive.Name);<br> FLastActive := ActiveControl;<br>end;<br><br>end.<br>