用VB程式設計畫圓

2022-03-28 07:41:09 字數 2137 閱讀 1424

1樓:涐吢銥舊囿儚

給你一段**參考吧。

具體的引數,你可以自己修改一下。

上張效果圖,**在後面。

private sub command1_click()dim i as long

me.cls

for i = 1 to 10

me.circle (i * 600 - 300, 600), 300, vbred

next

end sub

private sub command2_click()dim i as long

me.cls

for i = 1 to 10

me.circle (750, i * 600 - 300), 300, vbred

next

end sub

private sub command3_click()dim i as long, p as longme.cls

for i = 1 to 10

p = i * 600 - 150

me.circle (p, p), 420, vbrednext

end sub

2樓:滿以柳

效果如圖:

"橫排畫圓"按紐程式如下:

private sub command1_click()dim centerx, centery as integerdim rad as integer

dim i as integer

'定義並設定畫圓的中心座標(centerx,centery)及半徑 rad

centerx = 100

centery = 100

rad = 50

'迴圈畫10個圓,中心偏移為一個半徑大小

for i = 0 to 9

me.circle (centerx + i * rad, centery), rad, vbred

next i

end sub

其它的程式類似,可以自己閱讀...

vb程式設計在picturebox畫圓

3樓:匿名使用者

private sub picture1_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 picture1_mousemove(button as integer, shift as integer, x as single, y as single)

if button = 1 then

picture1.autoredraw = false

picture1.refresh

picture1.pset (x1, y1)

picture1.circle (x1, y1), sqr((x - x1) ^ 2 + (y - y1) ^ 2)

end if

end sub

private sub picture1_mouseup(button as integer, shift as integer, x as single, y as single)

if button = 1 then

picture1.autoredraw = true

picture1.circle (x1, y1), sqr((x - x1) ^ 2 + (y - y1) ^ 2), end if

end sub

4樓:匿名使用者

是不是圓心偏左?

還是沒看懂你的問題在哪兒,呵呵

怎麼用vb畫一個逐漸生成的圓

5樓:匿名使用者

你好,從你的描述來看,不用過於擔心,建議一週後複查b超看看胎兒的發育情況。

病情分析:

正常情況下孕5周左右b超可見宮腔內孕囊。

從b超結果看,宮腔內的液性暗區暫時不能確定就是孕囊。

指導意見:

建議暫觀察,注意休息,避免性生活和劇烈運動,一週後複查b超,若可見卵黃囊和胚芽,則可確定是宮內妊娠。

vb程式設計計算VB程式設計計算

第一種 對比計算privatesub mand1 click timer1.enabled truetimer1.interval 1 計算一次用時量endsubprivatesubform load text2.text 0 計算方法初始化text3.text 0 計算開始初始化text4.tex...

vb程式設計題目,VB程式設計題目

private sub mand1 click if len text1 2 thentext1 left text1,2 end if end sub private sub mand2 click text1 end sub private sub form load label1.captio...

VB程式程式設計,什麼是VB程式設計?

private sub command1 click dim t x y z t val text1.text if t 100 or len text1.text 3 then msgbox 輸入的數字不符合要求 vbinformation exit sub end if z t mod 10 y...