imports system.diagnostics
public class fsvcommon
'********************************************************************************************
'功能 :關閉指定進程
'參數 :processname:進程名
'返回值:無
'上傳時間:2005/04/18
'********************************************************************************************
public shared function killprocess(byval processname as string)
dim pprocess() as process '進程序列
dim myprocess as process '進程名
pprocess = process.getprocessesbyname(processname)
'查找所指定的進程
for each myprocess in pprocess
myprocess.kill()
next
end function
'********************************************************************************************
'功能 :計算指定字符串的長度(web)
'參數 :txtstring:指定字符串
'返回值:長度
'上傳時間:2005/04/18
'********************************************************************************************
private function getlength(byval txtstring as string) as integer
dim textlength as integer '字符串的長度
textlength = txtstring.length
dim i as integer '循環變量
for i = 0 to txtstring.length - 1
'是否為全角字符的判斷
if not (0 <= asc(txtstring.substring(i, 1)) _
and asc(txtstring.substring(i, 1)) <= 255) and _
not (65377 <= asc(txtstring.substring(i, 1)) _
and asc(txtstring.substring(i, 1)) <= 65439) then
textlength = textlength + 1
end if
next
return textlength
end function
end class
新聞熱點
疑難解答
圖片精選