| 发表于:2007-08-08 10:39:532楼 得分:0 |
option explicit private sub form_load() dim str1 as string str1 = "test " text1.text = fixedstr(str1, 20) end sub function fixedstr(byval sinput as string, byval lfixlen) dim llen as long llen = len(sinput) if llen < lfixlen then fixedstr = sinput & space(lfixlen - llen) else fixedstr = left(sinput, lfixlen) end if end function | | |
|