borderbrush := createsolidbrush(colortorgb(fedgecolor));
enterbrush:= createsolidbrush(colortorgb(fentercolor));
outerbrush:=createsolidbrush(colortorgb(clwhite));
//not(csdesigning in componentstate保证在设计期不变
if (not(csdesigning in componentstate)) and
(mousein=true) then //如果鼠标进入
begin
//画一个矩形框,用borderbrush画笔
framerect(dc, r, borderbrush);
//把r缩小一个象素
inflaterect(r, -1, -1);
//画一个矩形框,用outerbrush画笔
framerect(dc, r, outerbrush);
inflaterect(r, -1, -1);
framerect(dc, r, enterbrush);
end
else //如果鼠标没有进入
begin