15 Ocak 2012 Pazar

Visual Basic ile Tek harekette text dosyası yükleme

Posted by Unknown On 00:12 No comments

FileText fonksiyonunu kullanarak istediginiz dosyayi açar ve textbox içine yerlestirirsiniz.
Fonksiyonu Bas modulu içine yaz

Function FileText (filename$) As String
Dim dosya As Integer
dosya = FreeFile
Open filename$ For Input As #dosya
FileText = Input$(LOF( dosya), dosya)
Close # dosya
End Function

Text1.Text = FileText("c:\autoexec.bat") 'Text1 textbox'una tek hamlede autoexec.bat içerigi yüklenir.

0 yorum:

Yorum Gönder