Hello! glad to talk with you again! you are very effective! !
ok i have a little problem with a code!
indeed, my code generate a random file but sometimes i have no file,error or a blank in a mediaplayer or other stuff!
here is my code:
i suspect when the computer read my text file it could read a blank line. how must we fix it?Code:Dim Randomtaunt As New Random() Dim Tra As IO.TextReader = System.IO.File.OpenText(Application.StartupPath & "\movies\TAUNTVICTORY\" & Me.Label23.Text & ".txt") Dim FileLinest() As String = Split(Tra.ReadToEnd(), vbCrLf) Tra.Close() Dim MyTAUNT As String = FileLinest(Randomtaunt.Next(0, UBound(FileLinest))) Me.AxWindowsMediaPlayer5.URL = Application.StartupPath & "\movies\TAUNTVICTORY\" & MyTAUNT Me.AxWindowsMediaPlayer5.settings.setMode("loop", False) Me.AxWindowsMediaPlayer5.Ctlcontrols.play()
thank you in advance for your answer!




Reply With Quote
