Page 95 - Programming VB.NET
P. 95

Code With VB.Net                              91


                  Public Class Form1

                      Private Sub btnsave_Click(ByVal sender As
                  System.Object, ByVal e As System.EventArgs)
                  Handles btnsave.Click
                          Dim objstudent As Student

                          objstudent = New Student

                          GetData(objstudent)
                          txtgrade.Text = objstudent.testgrade

                      End Sub


                      Private Sub GetData(ByVal objstudent As
                  Student)
                          objstudent.name = txtname.Text

                          objstudent.regnum = txtreg.Text

                          objstudent.mark = txtmark.Text
                      End Sub



                      Private Sub btnexit_Click(ByVal sender As
                  System.Object, ByVal e As System.EventArgs)
                  Handles btnexit.Click

                          End

                      End Sub
                  End Class
   90   91   92   93   94   95   96   97   98   99   100