หน้าหลัก     วิชวลเบสิค     บริหารงานบุคคล     บริหารความก้าวหน้า     บริหารการทำงาน     คิดค่าชั่วร้านเน็ต     โพโต้ ลิงค์  
.

หน้าหลัก

Vb main
Download
Web Board
Link Lists

การกระซับข้อมูล
ฟังก์ชั่นเกี่ยวกับ ListBox
Edit ListBox
เกี่ยวกับ TextBox
เกี่ยวกับ ComboBox
เกี่ยวกับ MSFlexGrid
เกี่ยวกับตัวอักษร
เกี่ยวกับวันที่ เวลา

ฟังก์ชั่นเกี่ยวกับตัวอักษร



Function UT_Token$(p_gSource$, p_gSeparator$)
'-------------------------------------------------------
'Call: p_gSource$ String to modify
'   p_gSeparator$ Delimiting string
'
'Ret : UT_Token$ First token from string
'    p_gSource$ Source with first token removed
'
'Notes:
'------------------------------------------------------
Dim gToken$, iPos%

iPos = InStr(p_gSource, p_gSeparator)
If iPos = 0 Then
   gToken = p_gSource
   p_gSource = ""
Else
   gToken = Left$(p_gSource, iPos - 1)
   p_gSource = Mid$(p_gSource, iPos + Len(p_gSeparator))
End If

UT_Token = gToken
End Function

Function UT_stuff$(p_tString$, p_iStart%, p_nDelete%, p_tStuff$)
'----------------------------------------------
'
' Call: p_tString string to stuff
'    p_iStart starting position at which to stuff
'    p_nDelete number of characters to delete
'    p_tStuff text to stuff
'
' Ret: string with requested deletion/db_valion
'    eg. ?UT_stuff$("bcdefg", 2, 3, "x")
'    bxfg
'
'----------------------------------------------
UT_stuff = Left$(p_tString, p_iStart - 1) & p_tStuff & Mid$(p_tString, p_iStart + p_nDelete)

End Function

Function UT_StripCharacter(StringToStrip As String, StrippingChar As String) As String
'------------------------------------------
'Call: StringToStrip
'    StrippingChar
'    eg. ? UT_StripCharacter("asdfasdfasdfasdf","a")
'    "sdfsdfsdfsdf"
'---------------------------------------
Dim iCount As Integer
Dim strTemp As String

iCount = 1
strTemp = StringToStrip

Do While iCount <> 0
'Find the position of the character to be stripped
   iCount = InStr(iCount, strTemp, StrippingChar)
'If the character was found, then strip it
   If iCount <> 0 Then _
     strTemp = Left(strTemp, iCount - 1) & Right(strTemp, Len(strTemp) - iCount)
Loop

UT_ StripCharacter = strTemp

End Function

. .
. Copy right(C)1999 by Amnart Viengkham. .