Hi All
what would be the VB.net equivelent of this code from
sams teach yourself vb6 in 21 days
1: Private Sub cmdFile_Click()
2: Dim intCtr As Integer ‘ Loop counter
3: Dim intFNum As Integer ‘ File number
4: Dim intMsg As Integer ‘ MsgBox() return
5: intFNum = FreeFile
6: ‘ Change the path if you want
7: Open “C:\Print.txt” For Output As #intFNum
8:
9: ‘ Describe this proc
10: intMsg = MsgBox(“File Print.txt opened”)
11:
12: For intCtr = 1 To 6
13: Print # intFNum, intCtr; ‘ Notice semicolon!!
14: intMsg = MsgBox(“Writing a ” & intCtr & “ to Print.txt”)
15: Next intCtr
16:
17: Close # intFNum
18:
19: intMsg = MsgBox(“File Print.txt closed”)
20: End Sub
as i liked using this code as a baseline in my vb6 project
sny advice would be greatful
what would be the VB.net equivelent of this code from
sams teach yourself vb6 in 21 days
1: Private Sub cmdFile_Click()
2: Dim intCtr As Integer ‘ Loop counter
3: Dim intFNum As Integer ‘ File number
4: Dim intMsg As Integer ‘ MsgBox() return
5: intFNum = FreeFile
6: ‘ Change the path if you want
7: Open “C:\Print.txt” For Output As #intFNum
8:
9: ‘ Describe this proc
10: intMsg = MsgBox(“File Print.txt opened”)
11:
12: For intCtr = 1 To 6
13: Print # intFNum, intCtr; ‘ Notice semicolon!!
14: intMsg = MsgBox(“Writing a ” & intCtr & “ to Print.txt”)
15: Next intCtr
16:
17: Close # intFNum
18:
19: intMsg = MsgBox(“File Print.txt closed”)
20: End Sub
as i liked using this code as a baseline in my vb6 project
sny advice would be greatful