web development India freelance website designer
open a textfile on disk into a textbox, make a Form with a TextBox (multiline = True) and two commandbuttons

'put the next code on the appropiate places

Sub Command1_Click()
Call GetFile("c:\autoexec.bat")
End Sub

Private Sub GetFile(FileName$)
Dim nFilenumber%
Dim tmpLine$
Text1.Text = ""
nFilenumber = FreeFile
Open FileName$ For Input As #nFilenumber
Do While Not EOF(nFileNumber)
Input #nFileNumber, tmpLine
Text1.Text = Text1.Text & tmpline
Loop
Close #nFileNumber
End Sub

'save the content of a textbox into a file on disk

Sub Command2_Click()
Dim answer$
answer$ = InputBox("Which name will you give the file?")
If answer$="" then Exit Sub
Call SaveFile(answer$)
End Sub

Private Sub SaveFile(FileName$)
Dim nFilenumber%
nFilenumber = FreeFile
Open FileName$ For Output As #nFilenumber
Print #nFileNumber, Text1.Text
Close #nFileNumber
End Sub
Copy TextFile into TextBox

1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550

Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design