u 然后再新建一个工程,单击【file】->【new】->【application】,把mycontrol页中的mypanel拖到form上,按f11键,切换到events页,如下:

和tpanel比较一下,看是不是多了onmouseenter和onmouseleave事件。双击onmouseenter,写代码如下:
procedure tform1.mypanel1mouseenter(sender: tobject);
begin
showmessage('鼠标进入mypanel1');
end;
然后按f9运行,移动鼠标到mypanel1上,看一下结果如何。