发信人: pig2609(肥猪) 
整理人: hunter__fox(2002-03-16 22:15:51), 站内信件
 | 
 
 
新年来啦, 大伙儿都将好东西拿一点出来, 共贺新年了
 
 
 FUNCTION gvDelay
 *-- 暂停几秒
 LPARAMETER tnSec
 Declare integer Sleep in kernel32.dll integer nMSec
 sleep(tnSec*1000)
 RETURN 
 
 
 
 FUNCTION gcTrimMemo
 *- 去掉memo中,前面 和 后面已没有字符的空行 
 *- 用在form的editBox的lostFocus中
 Parameter tcMemo,tlTrimLeft
 local cRet
 
 ln开头不为空的行=1
 if tlTrimLeft
 	for i=1 to memlines(tcMemo)
 		if NOT empty( mLine(tcMemo,i) )
 			ln开头不为空的行=i
 			exit 
 		endif
 	next
 endif
 
 ln结尾不为空的行=MEMLINES(tcMemo)
 For i=MEMLINES(tcMemo) to 1 step -1
 	if NOT empty( mLine(tcMemo,i) )
 		ln结尾不为空的行=i
 		exit 
 	endif
 next
 
 cRet=mLine(tcMemo,ln开头不为空的行)
 for i=ln开头不为空的行+1 to ln结尾不为空的行
 	cRet=cRet+chr(0x0D)+chr(0x0A)+mLine(tcMemo,i)
 next
 
 Return cRet
 
 
  ---- max chen
 senior programer 
 [email protected]
 QQ:65004737
  | 
 
 
 |