73) Design a form and write a program in visual basic for output file. The output file contains roll no, name and total marks of some student. Name of this output file is marks.dat. Append some record in same output file. Number of record can be input by the user from keyboard until he wants?

Private Sub Command1_Click()     Dim SName As String     Dim rn, tm As String     Open "Marks.dat" For Append As #1     rn = 1     Do While rn > 0         SName = InputBox("Enter Student Name", "String")         rn = InputBox("Enter Roll No", "Integer")         tm = InputBox("Enter Total Marks", "Integer")         If rn... Continue Reading →

Advertisements

72) Design a form and write a program in visual basic to input roll no and total marks of 10 students from keyboard. Write roll no and total marks of those students to pass.dat file which total marks is greater than or equal to 300. Write roll no and total marks of remaining student to fail.dat file?

Private Sub Command1_Click()     Dim i, rn, tm As Integer     Open "Pass.dat" For Output As #1     Open "Fail.dat" For Output As #2     For i = 1 To 10         rn = InputBox("Enter Roll No ", "Integer")         tm = InputBox("Enter Total Marks ", "Integer")         If tm >= 300 Then             Write... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: