OnEnter事件: var nHandle: HRGN; begin with Combobox1 do begin nHandle := CreateRectRgn(0, 0, width, height); SetWindowRgn(Handle, nHandle, True); end; end;在OnExit事件:var nHandle: HRGN; begin with Combobox1 do begin nHandle := CreateRectRgn(0, 0, width-20, height); SetWindowRgn(Handle, nHandle, True); end; end
var
nHandle: HRGN;
begin
with Combobox1 do
begin
nHandle := CreateRectRgn(0, 0, width, height);
SetWindowRgn(Handle, nHandle, True);
end;
end;在OnExit事件:var
nHandle: HRGN;
begin
with Combobox1 do
begin
nHandle := CreateRectRgn(0, 0, width-20, height);
SetWindowRgn(Handle, nHandle, True);
end;
end