RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums

Newbie Help

Join Date: Aug 2005
Posts: 32
Reputation: Marikanna is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
Marikanna Marikanna is offline Offline
Light Poster

Re: Newbie Help

  #3  
Aug 8th, 2005
Hi

I am attaching a sample program which initially loads all the file name into a List Box and then when you click on each item in the List Box it opens up the specified text file and display it in a Label.

Sample code is shown below. Attachment has the complete program.

Private Sub List1_Click()
Dim i As Integer

If (FExists("C:\sample\" + List1.Text + ".txt") = True) Then
ReadFromFile ("C:\sample\" + List1.Text + ".txt")
End If



    For i = 1 To TotalLine
    Label1.Caption = FileText(i)
    Next i

End Sub




Marikanna

---------------------------------------------------------------------

Success is a Journey, not a Destination
Attached Files
File Type: zip sample.zip (2.6 KB, 3 views)
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 8:39 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC