private sub text1_change()dim a as stringdim b as stringa=label1.captionb=ucase(text1.text)pos=instr(a,b)label4.caption=b & "" & posend subucase会变成大写处于选中状态:text1.set focustext1.selstart=0text1.sellength=len(text1.text)