| 发表于:2007-03-13 14:31:245楼 得分:0 |
谢谢winner8080(志在云天) 再问一下,如果我想用鼠标右键拖动新创建的图 bool bmousedown = false; int ix,iy; void __fastcall tform1::image1mousedown(tobject *sender, tmousebutton button, tshiftstate shift, int x, int y) { if(button==mbright) ix = x; iy = y; bmousedown = true; } //--------------------------------------------------------------------------- void __fastcall tform1::image1mouseup(tobject *sender, tmousebutton button, tshiftstate shift, int x, int y) { bmousedown = false; } //--------------------------------------------------------------------------- void __fastcall tform1::image1mousemove(tobject *sender, tshiftstate shift, int x, int y) { if(bmousedown) { doublebuffered = true; image1-> left = image1-> left + x - ix; image1-> top = image1-> top + y - iy; } 但是好像不是成功,,有时左键也起作用。 | | |
|