begin
if (y>=0)and(y<=3) then panel1.perform(wm_syscommand,$f003,0);
if (y>3)and(y<panel1.height-3) then panel1.perform(wm_syscommand,$f012,0);
if (y>=panel1.height-3)and(y<=panel1.width) then panel1.perform(wm_syscommand,$f006,0);
end
else if (x>=panel1.width-3)and(x<=panel1.width) then
begin
if (y>=0)and(y<=3) then panel1.perform(wm_syscommand,$f005,0);
if (y>3)and(y<panel1.height-3) then panel1.perform(wm_syscommand,$f002,0);
if (y>=panel1.height-3)and(y<=panel1.width) then panel1.perform(wm_syscommand,$f008,0);
end;
end;
procedure tform1.panel1mousemove(sender: tobject; shift: tshiftstate; x,
y: integer);
begin
if (x>=0)and(x<=3) then
begin
if (y>=0)and(y<=3) then panel1.cursor:=crsizenwse;
if (y>3)and(y<panel1.height-3) then panel1.cursor:=crsizewe;
if (y>=panel1.height-3)and(y<=panel1.height) then panel1.cursor:=crsizenesw;
end
else if (x>3)and(x<panel1.width-3) then
begin
if (y>=0)and(y<=3) then panel1.cursor:=crsizens;
if (y>3)and(y<panel1.height-3) then panel1.cursor:=crarrow;
if (y>=panel1.height-3)and(y<=panel1.width) then panel1.cursor:=crsizens;
end
else if (x>=panel1.width-3)and(x<=panel1.width) then
begin
if (y>=0)and(y<=3) then panel1.cursor:=crsizenesw;
if (y>3)and(y<panel1.height-3) then panel1.cursor:=crsizewe;
if (y>=panel1.height-3)and(y<=panel1.width) then panel1.cursor:=crsizenwse;
end;
end;
附录2.api sendmessage()介绍
sendmessage === user32.lib
lresult sendmessage(
hwnd hwnd, // handle of destination window
uint msg, // message to send
wparam wparam, // first message parameter
lparam lparam // second message parameter