Private Sub Command6_Click() Dim Text Open "C:\Documents and Settings\Administrator\×ÀÃæ\22.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Text Text1.Text = Text & vbCrLf Loop Close #1 End Sub
ÏñÕâÑùдµÄ»°Êä³öºóÀÏÊÇÖ»ÏÔʾ×îºóÒ»Ìõ¼Ç¼£¡~ÎÒÏë°ÑTXTÀïÃæµÄ¶«Î÷È«ÏÔ³öÀ´ÔõôŪ£¿£¿Text1.Text =Text1.Text & Text & vbCrLf ¾Í1·Ö,¥ϵıð»ØÁË ÎÒ¶¼Ã»·ÖÐÂÊÖ²»ÖªµÀÔõôŪ²»ÖÁÓÚ²»°ï°É Ï´ηֶàÎÒ»á³ö·ÖµÄллÁË ÎһشðµÄÕýÈ·,²»ÖÁÓÚ²»¸ø·Ö°É
VB code:
Private Sub Command6_Click() Dim Text Open "C:\Documents and Settings\Administrator\×ÀÃæ\22.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Text Text1.Text =Text1.Text & Text & vbCrLf Loop Close #1 End Sub