如何用vb把足彩中的复式全部展开变成单式,并投入到一个文本框里
就是用vb语言,实现像足彩软件那样一样的,在14种比赛中,随机投注比如选取31,10,1,310,30,31,30,1,0,310,10,13,10。按一个按键就能把选取的投注单生成单注,投入到一个文本框中。请各位高手帮忙了 --------------------编程问答--------------------
'复式分解
Friend Function FuShiFenJie(ByVal strFuShi$) As String()
Dim strData$, strtemp$
Dim vTemp() As String, vData() As String
Dim i%, j%, intGoShu%
Dim k&, Counter&
vTemp = Split(strFuShi, ",")
Counter = 1
For i = 0 To UBound(vTemp)
intGoShu = Len(vTemp(i))
If intGoShu > 1 Then Counter = Counter * intGoShu
Next
ReDim vData(Counter - 1) As String
Counter = 1
For i = 0 To UBound(vTemp)
strData = vTemp(i)
intGoShu = Len(strData)
For j = intGoShu - 1 To 0 Step -1
strtemp = Mid$(strData, j + 1, 1)
For k = 0 To Counter - 1
vData(j * Counter + k) = vData(k) & strtemp
Next
Next
If intGoShu > 1 Then Counter = Counter * intGoShu
Next
FuShiFenJie = vData
End Function
我做了一个VB程序
以上是复式分解函数
你参考一下,如可以优化,请发优化版给我.
补充:VB , 基础类