■49382 / inTopicNo.3) |
Re[2]: 文字列の削除 |
□投稿者/ なし (2回)-(2010/05/02(Sun) 17:38:14)
|
■No49381 (太郎冠者 さん) に返信 > とりあえずString.Replace メソッドとか > http://msdn.microsoft.com/ja-jp/library/fk49wtc1(v=VS.80).aspx > > Dim strA As String > Dim strB As String > strA = "○□△" > strB = strA.Replace("○","") > Public Class Form1 Dim gga As Long = ListBox1.Items.Count Dim nuku As String Dim nukigo As String Dim jikai As Long Dim list(0 To 999) As Long Dim a As String = "C:\Users\name\Desktop\フォトラボ\フォトラボ\bin\Debug"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim t As Long ListBox1.DataSource = System.IO.Directory.GetFiles(a, "*.png") Do Until jikai > gga ListBox1.Items.Item(jikai) = nuku nukigo = nuku.Replace(a, "") list(t) = nukigo jikai += 1 t = t + 1 Loop Do Until t > 999 ListBox1.Items.Add(t) Loop End Sub End Class こんな感じでいいのでしょうか。まだフォーム読み込みエラーですけど。
|
|