如何将可移动目标限制在特定区域内?
例如 "Image "等控件.
用键盘控制 Image 控件移动, 移动过头Image就消失了,如何限制移动区域? 当移动到FORM的边缘就不能在移动.
像游戏那种效果.
[解决办法]
'右边检查
if Image1.left > me.scalewidth - image1.width then
'不移动
else
Image1.Left = Image1.Left + 10
end if
其他的方向,类似