| 发表于:2007-01-12 10:40:364楼 得分:40 |
private sub combo1_keypress(keyascii as integer) dim i as long dim str as string if keyascii > = &h30 and keyascii <= &h39 then combo1.seltext = " " str = combo1.text & chr(keyascii) if len(str) > 2 then keyascii = 0 end if str = left(str & "* ", 2) for i = 0 to combo1.listcount - 1 if combo1.list(i) like str then exit for end if next if i > = combo1.listcount then keyascii = 0 end if end if end sub private sub form_load() dim i as long for i = 0 to 23 combo1.additem format(i, "00 ") next end sub | | |
|