vb程式設計急急急急急急急急急急急急急

時間 2021-10-15 00:12:42

1樓:匿名使用者

我有類似現成的程式,是我給孩子編的,你給個郵箱,給你發過去.

2樓:

下面的**另存為form1.frm

version 5.00

begin vb.form form1

caption = "form1"

clientheight = 8985

clientleft = 60

clienttop = 345

clientwidth = 10830

linktopic = "form1"

scaleheight = 8985

scalewidth = 10830

startupposition = 3 '視窗預設

begin vb.commandbutton command2

caption = "提交"

height = 615

left = 6960

tabindex = 6

top = 3840

width = 2055

endbegin vb.textbox text1

height = 1215

left = 7320

tabindex = 5

top = 2160

width = 1575

endbegin vb.label label14

height = 495

left = 9240

tabindex = 15

top = 1080

width = 1455

endbegin vb.label label13

caption = "正確率為:"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 400

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 495

left = 7080

tabindex = 14

top = 1080

width = 1815

endbegin vb.label label6

height = 3015

left = 1200

tabindex = 13

top = 5760

width = 8535

endbegin vb.label label12

caption = "答題記錄"

height = 495

left = 1200

tabindex = 12

top = 4560

width = 2055

endbegin vb.label label11

caption = "題"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 405

left = 5640

tabindex = 11

top = 1080

width = 855

endbegin vb.label label10

caption = "0"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 405

left = 4800

tabindex = 10

top = 1080

width = 615

endbegin vb.label label9

caption = "題,已做對:"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 405

left = 2760

tabindex = 9

top = 1080

width = 1815

endbegin vb.label label8

caption = "1"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 405

left = 2040

tabindex = 8

top = 1080

width = 495

endbegin vb.label label7

beginproperty font

name = "宋體"

size = 36

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 1215

left = 9360

tabindex = 7

top = 2160

width = 1215

endbegin vb.label label5

caption = "="

beginproperty font

name = "宋體"

size = 36

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 1095

left = 5880

tabindex = 4

top = 2160

width = 975

endbegin vb.label label4

beginproperty font

name = "宋體"

size = 36

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 1095

left = 4080

tabindex = 3

top = 2160

width = 1335

endbegin vb.label label3

beginproperty font

name = "宋體"

size = 36

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 1095

left = 2520

tabindex = 2

top = 2160

width = 1215

endbegin vb.label label2

beginproperty font

name = "宋體"

size = 36

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 975

left = 840

tabindex = 1

top = 2160

width = 1215

endbegin vb.label label1

backstyle = 0 'transparent

caption = "當前第:"

beginproperty font

name = "宋體"

size = 15

charset = 134

weight = 700

underline = 0 'false

italic = 0 'false

strikethrough = 0 'false

endproperty

height = 400

left = 720

tabindex = 0

top = 1080

width = 2295

endend

attribute vb_name = "form1"

attribute vb_globalnamespace = false

attribute vb_creatable = false

attribute vb_predeclaredid = true

attribute vb_exposed = false

dim m as integer, n as integer, f as integer

private sub command2_click()

if command2.caption = "提交" then

if text1.text = "" then

msgbox "請回答!"

else

if f = 1 then

if cint(label2.caption) + cint(label4.caption) = cint(text1.text) then

label7.caption = "√"

m = m + 1

else

label7.caption = "×"

end if

elseif f = 2 then

if cint(label2.caption) - cint(label4.caption) = cint(text1.text) then

label7.caption = "√"

m = m + 1

else

label7.caption = "×"

end if

elseif f = 3 then

if cint(label2.caption) * cint(label4.caption) = clng(text1.text) then

label7.caption = "√"

m = m + 1

else

label7.caption = "×"

end if

elseif f = 4 then

if cint(label2.caption) / cint(label4.caption) = cint(text1.text) then

label7.caption = "√"

m = m + 1

else

label7.caption = "×"

end if

end if

command2.caption = "下一題"

n = n + 1

dim jilu as string

jilu = label2.caption & label3.caption & label4.

caption & "=" & text1.text & label7.caption & chr(13) + chr(10)

label6.caption = label6.caption & jilu

end if

elseif command2.caption = "下一題" then

call form_load

command2.caption = "提交"

label7.caption = ""

text1.text = ""

text1.setfocus

end if

end sub

private sub form_load()

dim a, b, c as integer

randomize

a = cint(rnd() * 90 + 10)

b = cint(rnd() * 90 + 10)

f = int(rnd() * 4) + 1

if f = 1 then

label3.caption = "+"

elseif f = 2 then

label3.caption = "-"

if a < b then c = a: a = b: b = c

elseif f = 3 then

label3.caption = "*"

elseif f = 4 then

label3.caption = "/"

while a mod b <> 0

b = cint(rnd() * 90 + 10)

wend

end if

label2.caption = a

label4.caption = b

label8.caption = n + 1

label10.caption = m

if n > 0 then label13.caption = format(m / n, "0.00%")

end sub

急急急急急急急急急急急急急急急急急急急急震撼心靈的作文不要抄,寫的好的加分

阿瑟 所有的人都應該反思,社會何以變成現在這樣?是社會質變了,還是我們都麻木了?伸出你的手,希望有一天,只是希望,這種畫面不再出現!真的縴夫!那有幾多愛?天府的脊樑,我想,沒有什麼可以打動我了,除非涉及到我和我的家人。但是我錯了,當如此之多的 擺在面前的時候,那種強烈的的視覺衝擊和久違的震撼深深的打...

急急急急急急急急急急急急急急急急急急急急急急急急懇請各位大師替小弟算算,萬分感激

的觀點是我自己的愚見,我讀了喬葉 和自己的棋整理答案。1,因為作者認為,遊戲是為了證明自己,所謂的對手,但另一種解釋。運動員誰贏在奧運會上,面對自己真正的對手,他們的成就把握超越自己的結果,作者認為他們的勝利的結果不排在第一位,但和自己的殘酷的戰鬥之前採摘冠。br 2,因為知道如何下棋,和自己需要了...

急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急急

你的問題我也遇到過,先告訴你彆著急,原因是mpg和mpv的解碼程式遭到破壞,解決辦法是把超級解霸完全的解除安裝乾淨,在重新安裝,如果還是有問題,可能就是相容性問題導致你的版本衝突,重新下個mpg和mpv解碼程式替代。如果沒裝 directdraw 驅動程式,音效卡又是es688型別,而且又是在16色...