vb程式編寫

2022-11-03 01:00:47 字數 1870 閱讀 1650

1樓:匿名使用者

dim i as integer

private sub form_click()form1.scale (0, 20)-(20, 0)i = i + 1

if i mod 3 = 1 then me.fillstyle = 0: me.fillcolor = vbred: circle (10, 10), 2, vbred

if i mod 3 = 2 then me.fillstyle = 0: me.

fillcolor = vbyellow: circle (10, 10), 2, vbyellow

if i mod 3 = 0 then me.fillstyle = 0: me.

fillcolor = vbgreen: circle (10, 10), 2, vbgreen

end sub

2樓:匿名使用者

1.private sub command1_click()

text2.text = strreverse(text1.text)

end sub

2.dim a() as integer, d() as integer

private sub command1_click()

b = text1.text

n = val(text3.text)

redim a(n)

redim d(n)

for u = 1 to n

if u < n then

a(u) = left(b, instr(b, ",") - 1)

d(u) = left(b, instr(b, ",") - 1)

b = right(b, len(b) - instr(b, ","))

else

if instr(b, ",") = 0 then

a(u) = b

d(u) = b

for i = 1 to n - 1

for j = i + 1 to n

if a(i) > a(j) then temp = a(i): a(i) = a(j): a(j) = temp

next j

next i

else

msgbox "你輸入的陣列有誤"

end if

end if

next u

for h = 1 to n

if a(1) = d(h) then

e = d(1): d(1) = d(h): d(h) = e

exit for

end if

next h

for j = 1 to n

text2.text = text2.text & d(j) & " : "

next j

end sub

3.dim a(1 to 6) as integer

private sub command1_click()

for h = 1 to 6

a(h) = h

next h

scale (0, 0)-(100, 100)

for i = 1 to 6

for u = 1 to 6

if u + i <= 7 then

currentx = (u + i) * 5: currenty = i * 5

else

currentx = (u + i - 6) * 5: currenty = i * 5

end if

print a(u)

next u

next i

end sub

這是程式** 全部程式 我發到你郵箱了 你看看

用vb編寫程式,計算

option explicitdim k,t as singleprivate sub mand1 click for k 2 to 300 step 2t t 1 k next label1.caption t end sub for i 2 to 300 step 2 sum 1 i sum n...

如何編寫vb程式使程式實現以下功能

filelistbox timer控制元件 2個控制元件即可滿足你要求 啟動用shell 批處理可以用exit命令自行退出 vb 編寫一個程式,使其具有如下功能,1 隨機產生10個資料 我可以給你寫 幫你除錯好 vb程式設計題 1.編寫程式實現如下功能 如圖一 2.編寫程式實現如下功能 option...

vb程式題急謝謝編寫程式從文字框輸入與

設text1和text2分別為x和y的輸入框,text3輸出結果,另有 mand1是計算按鈕。在窗體代版碼 通權用 段編寫函式過程 private function f byval x as double,byval y as double as double select case x case ...