1樓:匿名使用者
全部方法和**:
在窗體上新增5個label,3個text和4個command,設定label1的caption為「姓名」,對應text1;label2設定為「專業」對應text2;label3設定為「總分」,對應text3,lebel4為「位置」,label5用來顯示目前所在的位置(具體如以下的圖:)。**如下:
private type student
xm as string * 6
zy as string * 10
zf as single '字串長度自己定end type
dim st(1 to 100) as studentdim n as integer, i as integer, t as integer
private sub command1_click() '新增if n > 100 then
msgbox "記錄數已滿!"
else
n = n + 1
t = t + 1
st(n).xm = cstr(text1.text)st(n).
zy = cstr(text2.text)st(n).zf = val(text3.
text)label5.caption = n & "/" & nend if
end sub
private sub command2_click() '前乙個if n = 1 then
msgbox "目前只有一條記錄,無法檢視前乙個!"
elseif n = 0 then
msgbox "無記錄,無法檢視!"
else
if t - 1 > 0 then
t = t - 1
text1.text = st(t).xmtext2.
text = st(t).zytext3.text = st(t).
zflabel5.caption = t & "/" & nelse
msgbox "已經是最前乙個了"
end if
end if
end sub
private sub command3_click() '後乙個if n = 1 then
msgbox "目前只有一條記錄,無法檢視後乙個!"
elseif n = 0 then
msgbox "無記錄,無法檢視!"
else
if t + 1 <= n then
t = t + 1
text1.text = st(t).xmtext2.
text = st(t).zytext3.text = st(t).
zflabel5.caption = t & "/" & nelse
msgbox "已經是最後乙個了"
end if
end if
end sub
private sub command4_click() '最高max = st(1).zf
for i = 1 to n
max = iif(max >= st(i).zf, max, st(i).zf)
next
for i = 1 to n
if st(i).zf = max thent = i
text1.text = st(t).xmtext2.
text = st(t).zytext3.text = st(t).
zflabel5.caption = t & "/" & nend if
next
end sub
private sub form_load()text1.text = ""
text2.text = ""
text3.text = ""
label5.caption = t & "/" & nend sub
2樓:
定義方法;
private type studientdim name as string
dim major as string
dim score as integer
end type
dim studients(100) as studient
求英語答案急急急,求英語題答案!!!!急急急急急急急急急急急急急!!!
1.d 2.a 3.c 4.a 5.b 6.b 7.c 8.a 9.a 10.b 11.c 12.d 13.c 14.a 15.c 希望有幫助!還有問題就問 dacabb ccab cdaac dacbbdccabcdadc 求英語題答案!急急急急急急急急急急急急急!careful are disc...
求答案急急急
正好拿完,6拿完剩下3,就是9的奇數倍,可寫成18m 9,又。8拿完剩下1個,故可寫成72n 9,5個拿剩下4,所以可寫成360x 9,最後7個拿剩下5,也就是10x 2除7餘5,x最小為1,雞蛋最少360 9 369個。筐裡有369個雞蛋。演算法,2個拿剩1個說明是奇數,5個拿剩4個說明尾數是9 ...
求英語題答案急急急急急急急急急急急急急
有一天想起 careful are discussing third service the latest enjoys inventors english died science spoken less foreigners pleasant farther unusual straight w...