Advertisement
Java_Volume1 Complete Applications #99000

Split Array and Line Selection

The Split() Return a Array has a Few Hidding secrets, For VB6 only, Here is a quick simple code to explain and also the famous (what is the max array solution)... It Convert a TextBox into a Line by Line Array the match the TextBox Line Number

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
<Br>Option Explicit
<Br>' put this code in a form, add a <Br>RichTextBox1, Text1, and a Command1 Button for vb6 only
<Br>Private Sub Command1_Click()
<Br>Dim x As Integer, i As Integer
<Br>Dim Ray() As String
<Br>x = 0
<Br>RichTextBox1.Text = "Spyo Was Here, and got" & vbCrLf & "1: One Choice" & vbCrLf & "2: No Choice" & vbCrLf & "3: None of the Above" & vbCrLf & "4: All of the Above"
<Br>Ray() = Split(RichTextBox1.Text, "" & vbCrLf & "")
<Br>For i = 0 To UBound(Ray)
<Br>x = x + 1
<Br>Next i
<Br>RichTextBox1.Text = ""
<Br>x = x - 1
<Br>For i = 0 To x
<Br>RichTextBox1.Text = RichTextBox1.Text & Ray(i) & vbCrLf
<Br>Next i
<Br>Text1.Text = x & " Arrays As In Ray(0),Ray(1),Ray(2),Ray(3),Ray(4), but not Ray(5) or Above"
<Br>End Sub
<Br>'This is something very usefull, please improve it and share,,, vote ?
원본 댓글 (3)
Wayback Machine에서 복구됨