| 发表于:2007-06-20 00:11:4512楼 得分:0 |
private sub text1_keydown(index as integer, keycode as integer, shift as integer) dim strpos as string if keycode > 0 and keycode <> 13 and keycode <> 8 then keyascii = 0 msgbox "输入字符必须为中文! ", 48, "提示 " end if if keycode = vbkeyreturn and index = 2 then if blnadd = false then if text1(3) <> " " then text1(3) = left(text1(3), len(text1(3)) - lngol) & "( " & text1(1) & ") " & text1(2) else if blntj = true then if treeview1.nodes.count > 0 then strpos = instr(1, treeview1.selecteditem.key, "\ ", 1) if strpos = 0 then text1(3) = text1(2) else text1(3) = treeview1.selecteditem.parent.fullpath & "\ " & text1(2) end if else text1(3) = text1(2) end if else text1(3) = treeview1.selecteditem.fullpath & "\ " & text1(2) end if end if end if if keycode = vbkeyreturn and index > 3 and index < 6 then text1(index + 1).setfocus end sub 这就是完整的代码,当我切换输入法时它就要提醒输入中文,怎么改呢 | | |
|