vb符串擷取函式急急急

時間 2022-03-31 10:55:11

1樓:昆櫻亮

新增乙個text,直接選取即可測試:

private sub form_load()text1.text = ""

for i = 0 to 25

text1.text = text1.text & chr(65 + i)

next i

end sub

private sub text1_mouseup(button as integer, shift as integer, x as single, y as single)

dim n as integer

dim m as integer

dim n_m as string

n = text1.selstart

m = text1.sellength

n_m = mid(text1.text, n + 1, m)if m <> 0 then

msgbox "the value of n: " & n & vbcrlf & "the value of m: " & m & vbcrlf & "the string between n and m :

" & n_m

end if

end sub

2樓:匿名使用者

private sub command1_click()print text1.selstart

print text1.sellengthprint mid(text1.text, text1.selstart + 1, text1.sellength)

end sub

3樓:老人與孩v動手洞腦

1. n=text1.selstart

2. m=len(text1.seltext) '或 m=text1.sellength

3. text1.seltext

4樓:匿名使用者

private sub text1_mouseup(button as integer, shift as integer, x as single, y as single)

print text1.sellength, text1.selstart, text1.seltext

end sub

5樓:小星火星

print text1.sellength, text1.selstart, text1.seltext

有不明白的q我1546985245

高一函式數學題急急急急急急急急急急急

我代表栗子先生 一 求函式的對稱軸就是b 2a a 所以當a 0時,函式在 0,2 上是遞增,g a g 0 1當0 a 2時,函式的定點在 0,2 上g a g a a 2 1 當a 2是,函式在 0,2 上是遞減,g a g 2 3 4a二 0 a 3,則當0 a 2時,g a a 2 1 在區...

vb程式設計高手請進!!急急急,vb程式設計高手請進!!急急急

第一題 編寫過程計算1 1 2 1 3 1 100private function sum dim i as integer for i 1 to 100 sum sum 1 i next end function 2 編寫過程列印如下圖形 private sub printstr dim i as...

急急急急函式f(x)sin x 2 3 sinx cosx在區間

輕候凌晴 f x sin x 2 3 sinx cosx 1 cos2x 2 3 2sin2x 3 2sin2x 1 2cos2x 1 2 cos 6sin2x sin 6cos2x 1 2 sin 2x 6 1 2 4 x 2 則 2 2x 3 2x 6 5 6 當2x 6 5 6時 f x mi...