考,delphi窗体句柄会变,我写注册热键程序的时候发现的。试试这样的代码,放到checkbox中看看。showmessage(inttostr(handle)); if chk2.checked then self.FormStyle := fsStayOnTop else self.formstyle := fsNormal;showmessage(inttostr(handle)); formstyle := fsstayontop ,这句的实现真是没想到,早知道直接用api指定算了... 相关文章: