0% found this document useful (0 votes)
30 views2 pages

Segunda Forma

This document contains the code for a class called Form1. It includes event handler subroutines for controls like labels, buttons, and text boxes. The btn_nuevo_Click subroutine calculates payroll values like hourly earnings, nightly earnings, and total pay based on inputs for hours and hourly pay rate. It formats and displays the values on the form. Other subroutines clear fields or close the form in response to button clicks.

Uploaded by

Jefferson Lindao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Segunda Forma

This document contains the code for a class called Form1. It includes event handler subroutines for controls like labels, buttons, and text boxes. The btn_nuevo_Click subroutine calculates payroll values like hourly earnings, nightly earnings, and total pay based on inputs for hours and hourly pay rate. It formats and displays the values on the form. Other subroutines clear fields or close the form in response to button clicks.

Uploaded by

Jefferson Lindao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Segunda Forma

Public Class Form1 Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub btn_nuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Dim PHN As Single PHN = If(Val(Me.txt_ht.Text) > 48, 8.0, 7.0) Me.lblPH.Text = Format(PHN, "##0.00") Me.lblTHE.Text = Format(Val(Me.txt_he.Text) * 9.5, "###,##0.00") Me.lblTHN.Text = Format(Val(Me.txt_ht.Text) * PHN, "###,##0.00") Me.lblTP.Text = Format(Val(Me.lblTHE.Text) + Val(Me.lblTHN.Text), "###,##0.00") End Sub

Private Sub lblPH_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblPH.Click End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click txt_nombreprofe.Clear() txt_he.Clear() txt_ht.Clear() lblPH.Text = " " lblTHE.Text = " " lblTHN.Text = " " lblTP.Text = " " txt_nombreprofe.Focus() End Sub End Class

You might also like