一道VB題,讓小球在矩形內可以由單選控制方向移動

時間 2022-03-08 09:45:07

1樓:

答過了:

2樓:祿涉

建議你用鍵盤右邊的數字鍵盤控制(7,9,1,3分別代表左上,右上,左下,右下)**如下:sub form_keydown(keycode as integer, shift as integer) select case keycode case vbkeyup: shape1.

move shape1.left, shape1.top - 100 case vbkeydown:

shape1.move shape1.left, shape1.

top + 100 case vbkeyleft: shape1.move shape1.

left - 100, shape1.top case vbkeyright: shape1.

move shape1.left + 100, shape1.top case 103:

shape1.move shape1.left - 100, shape1.

top - 100 case 105: shape1.move shape1.

left + 100, shape1.top - 100 case 97: shape1.

move shape1.left - 100, shape1.top + 100 case 99:

shape1.move shape1.left + 100, shape1.

top + 100end select end sub

3樓:匿名使用者

我去 看不清楚。。。。

vb裡一道題求解,求解VB一道題 最好解釋每一步

迮悅 private sub command1 click text1.visible falseend sub private sub command2 click text1.text vb程式設計 text1.visible true text1.fontsize 16 end sub pri...

關於VB的一道題

private sub half a as string,byval key as string,num as long a 物件是一個字元陣列 byval key是一個以值傳遞的字串,num不用說了 begin lbound a 這裡指的是陣列a的上標 0finish ubound a 下標如 a...

關於VB的一道題目,關於VB的兩道題

控制元件 command1,list1,label1.新增選單,名稱為mnu1,標題為 產生資料 如下。option explicit dim a 9 as byte,i as byte,t as byte,j as byte,min as byte,mini as byte private sub...