vb怎麼獲得矩形的座標,vb怎麼獲得矩形的座標

時間 2022-05-24 21:00:05

1樓:heart阿飛

dim x1 as integer, y1 as integer dim x2 as integer, y2 as integer private sub form_mousedown(button as integer, shift as integer, x as single, y as single) if button = 1 then x1 = x: y1 = y end sub private sub form_mousemove(button as integer, shift as integer, x as single, y as single) if button = 1 then me.cls me.

line (x1, y1)-(x, y), , b '顯示方框圖形 end if end sub private sub form_mouseup(button as integer, shift as integer, x as single, y as single) x2 = x: y2 = y if x1 <> x2 and y1 <> y2 then ' 如果滑鼠移動了 me.currentx = 0 me.

currenty = 0 '列印位置到0,0 print "起點座標x=" & x1 & " y=" & y1 print "終點座標x=" & x2 & " y=" & y2 end if end sub

2樓:polaris北斗

你說的的是立方體吧?

VB陣列操作,VB怎麼宣告陣列

能你的例子 希望對你有幫助 dim a 3 as integer dim i as integer a 0 1 a 1 2 a 2 3 a 3 4 for i o to 3 text1.text text1.text a i next i vb怎麼宣告陣列 如果有規律就可以用for next 來賦值...

vb裡面怎麼運用,vb裡面怎麼運用cmd

在 裡直接用shell命令呼叫cmd private sub command1 click shell cmd c ipconfig net user arp a pause vbnormalfocus end sub 上面這個就是在按鈕裡面的例項,共執行了3個命令ipconfig net user...

vb生成的ee檔案怎麼用vb開啟

vb生成的exe檔案已經不是源程式了,是供計算機執行的二進位制 了。所以vb編譯後的exe是無法用vb開啟了。只有vb的源程式才能用vb開啟。編譯程式 compiler,compiling program 也稱為編譯器,是指把用高階程式設計語言書寫的源程式,翻譯成等價的機器語言格式目標程式的翻譯程式...