學生資訊管理系統(一)是遇到的問題,除錯後能執行。而執行不是目的,讓使用者喜歡才是目的。所以我們要優化我們的系統。
開始很信任**給的原始碼,其實只要你知識豐富了些或思考了,就發現有很多不對的地方。
1.日期新增方式自動轉換
txtrudate.text = replace(txtrudate,".", "-")
txtrudate.text = replace(txtrudate,"/", "-")
".,/"查詢到的, "-"要改的
2.listbox課程不重複
list
控制項說明:
list
(index
):取索引值為
index
的item
項的值listindex
:當前選擇的
item
項的索引值
listcount
:返回當前
list
控制項中的
item
數量removeitem(index)
:從list
中刪除索引號為
index
的item
項clear
:刪除所有
item項。
private sub cmdadd_click()
dim intcount as integer
if listallcourse.listindex <> -1 then
intcount = 0
do while intcount < listselectcourse.listcount
iflistallcourse.list(listallcourse.listindex) = listselectcourse.list(intcount)then
msgbox "選擇課程重複,請重新選擇"
exit sub
end if
intcount = intcount + 1
loop
listselectcourse.additem listallcourse.list(listallcourse.listindex)
end if
end sub
3.班級不重複
mrc.movefirst
mrc.movefirst
while (mrc.eof = false)
if (trim(mrc.fields(1)) = trim(combograde.text)) then
msgbox "班級已經存在,請重選擇班級!", vbokonly + vbexclamation, "警告"
exit sub
combograde.text = ""
combograde.setfocus
else
mrc.movenext
end if
wend
if datediff("yyyy", cdate(txtrudate), cdate(txtborndate) + 7) > 0 then
5..學號按公升序排列
txtsql = "select * from student_info where student_id = '" & combosid.text & "'" & "order by student_id"
總之,
學生資訊管理系統 優化篇(1)
1.輸入數字和刪除鍵 private sub txtsid keypress keyascii as integer if keyascii 8 and keyascii 48 or keyascii 57 then keyascii 0 end if end sub2.輸入中英文及刪除鍵 priv...
學生資訊管理系統小結
學生資訊管理系統是學習vb以來第一次做的有邏輯,系統性的東西,從開始敲到現在功能都實現大約用了一周多的時間。收穫很多,感覺做乙個這樣比較有條理系統,不僅對我們 部分而且對我們的思維都有了很大的提高。想想將來要做的機房收費系統,現在已經沒那麼恐懼,不再覺得是不太可能完成的任務。反倒信心滿滿,很期待的樣...
學生資訊管理系統優化(一)
任何的系統在完成之前必須得優化,首先你的保證你做出來的軟體得沒有正常的邏輯問題,還得提高使用者體驗,讓別人用著比較舒服對吧!所以優化就是乙個不斷完善的過程!下邊我為大家分享一下我的優化心得!1.登入介面 首先你的保證你的登入介面不能隨意亂輸入,控制字元長度,而且要注意特殊字元的問題,防止別人輸入特殊...