//游標在控制項不同位置時的樣式
// 由於拐角這點手動精確實在困難 所以用範圍 範圍+3//改變控制項的大小這樣很容易就找到這一點了
procedure
ctrlmousemove(ctrl: twincontrol; shift: tshiftstate;x, y: integer);
begin
with ctrl do
begin
if (x >= 0) and (x <= 3) then
begin
if (y >= 0) and (y <= 3) then cursor :=crsizenwse;
if (y > 3) and (y < height - 3) then cursor :=crsizewe;
if (y >= height - 3) and (y <= height) then cursor :=crsizenesw;
endelse
if (x > 3) and (x < width - 3) then
begin
if (y >= 0) and (y <= 3) then cursor :=crsizens;
if (y > 3) and (y < height - 3) then cursor :=crarrow;
if (y >= height - 3) and (y <= width) then cursor :=crsizens;
endelse
if (x >= width - 3) and (x <= width) then
begin
if (y >= 0) and (y <= 3) then cursor :=crsizenesw;
if (y > 3) and (y < height - 3) then cursor :=crsizewe;
if (y >= height - 3) and (y <= width) then cursor :=crsizenwse;
end;
end;end;
procedure使用ctrlmousedown(ctrl: twincontrol; button: tmousebutton; shift: tshiftstate; x, y: integer);
varwparam: integer;
begin
with ctrl do
begin
if (x >= 0) and (x <= 3) then
begin
if (y >= 0) and (y <= 3) then wparam:=$f004;
if (y > 3) and (y < height - 3) then wparam:=$f001;
if (y >= height - 3) and (y <= height) then wparam:=$f007;
endelse
if (x > 3) and (x < width - 3) then
begin
if (y >= 0) and (y <= 3) then wparam:=$f003;
if (y > 3) and (y < height - 3) then wparam:=$f012;
if (y >= height - 3) and (y <= width) then wparam:=$f006;
endelse
if (x >= width - 3) and (x <= width) then
begin
if (y >= 0) and (y <= 3) then wparam:=$f005;
if (y > 3) and (y < height - 3) then wparam:=$f002;
if (y >= height - 3) and (y <= width) then wparam:=$f008;
end;
releasecapture;
sendmessage(handle,wm_syscommand,wparam,0);
end;end;
proceduretform1.panel1mousedown(sender: tobject; button: tmousebutton;
shift: tshiftstate; x, y: integer);
begin
ctrlmousedown(panel1, button, shift, x, y);
end;
procedure
tform1.panel1mousemove(sender: tobject; shift: tshiftstate;
x, y: integer);
begin
ctrlmousemove(panel1, shift, x, y);
end;
執行時改變控制項大小執行時移動控制項MINICAR版
執行時改變控制項大小執行時移動控制項minicar版 vs2005.net編寫,網上找了找,見別人寫得挺複雜,自己寫了乙個.附件居然不能上傳.就把 發到下面吧,有個奇怪現象就是,vb6中新建工建,拖個picturebox框出來,拷入以下 即可,但vb.net中是不行的.如mousemove事件你必須...
使用Actuator 在執行時改變日誌等級
基本配置 management server address 127.0.0.1 http localhost 19988 duno actuator info 預設位址 http localhost 19988 duno tiger act info 配置base path後的位址 loggers...
在執行時修改ObjectDataSource的引數
在乙個使用者查詢頁面有三個查詢分別查詢全部使用者,按名稱模糊查詢使用者和按照角色查詢使用者。這三個功能需要呼叫業務端三個不同的函式,它們的返回值一樣,都是資料物件集合sesgmembershipusercollection 使用gridview1來顯示查詢結果,objectdatasource1是資...