Skip to main content
Imports System.Media

Public Class Caculator
    Dim str1 As Double
    Dim str2 As Double
    Dim str As String
    Dim path = System.Windows.Forms.Application.StartupPath
    Dim LogOffsound As String
    Dim MyPlayer As New SoundPlayer()
    Private Sub Mainfrm_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        MyPlayer.SoundLocation = path & LogOffsound
        MyPlayer.Play()
        Loginfrm.PasswordTextBox.Text = ""
        Loginfrm.Show()
    End Sub

    Private Sub Mainfrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LogOffsound = "\LogOff.wav"
    End Sub


    Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click

        txtinput.Text += btn1.Text

    End Sub

    Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2.Click
        txtinput.Text += btn2.Text
    End Sub

    Private Sub btn3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn3.Click
        txtinput.Text += btn3.Text
    End Sub

    Private Sub btn6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn6.Click
        txtinput.Text += btn6.Text
    End Sub

    Private Sub btn5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn5.Click
        txtinput.Text += btn5.Text
    End Sub

    Private Sub btn4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn4.Click
        txtinput.Text += btn4.Text
    End Sub

    Private Sub btn7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn7.Click
        txtinput.Text += btn7.Text
    End Sub

    Private Sub btn8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn8.Click
        txtinput.Text += btn8.Text
    End Sub

    Private Sub btn9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn9.Click
        txtinput.Text += btn9.Text
    End Sub

    Private Sub btn15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn15.Click
        txtinput.Text += btn15.Text
    End Sub

    Private Sub btn16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn16.Click
        txtinput.Text += btn16.Text
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TextBox1.Enabled = False
        'TextBox1.MaxLength = 20
    End Sub

    Private Sub btn17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn17.Click
        txtinput.Text += btn17.Text
    End Sub

    Private Sub btn18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn18.Click
        txtinput.Text = ""
        str = ""
    End Sub

    Private Sub btn14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn14.Click
        'str = Val(TextBox1.Text)
        str2 = Val(txtinput.Text)
        If str = "-" Then
            txtinput.Text = str1 - str2
        ElseIf str = "+" Then
            txtinput.Text = str1 + str2
        ElseIf str = "*" Then
            txtinput.Text = str1 * str2
        ElseIf str = "/" Then
            txtinput.Text = str1 / str2
        End If

    End Sub

    Private Sub btn10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn10.Click
        str1 = Val(txtinput.Text)
        txtinput.Text = ""
        str = btn10.Text
    End Sub
    ' Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    ' Label1.Text = TimeOfDay
    ' End Sub

    Private Sub btn11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn11.Click
        str1 = Val(txtinput.Text)
        txtinput.Text = ""
        str = btn11.Text
    End Sub

    Private Sub btn12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn12.Click
        str1 = Val(txtinput.Text)
        txtinput.Text = ""
        str = btn12.Text
    End Sub

    Private Sub btn13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn13.Click
        str1 = Val(txtinput.Text)
        txtinput.Text = ""
        str = btn13.Text
    End Sub
End Class


Comments

Popular posts from this blog

GKS 2020 Winner Application Form

GKS 2020 Winner  Application Form  GKS scholarship has its own purpose to provide international students with opportunities to conduct advanced studies in undergraduate & graduate programs at higher educational institutions in the Republic of Korea in order to promote international exchanges in education and mutual friendship between countries. Qualifications Both an applicant and his/her parents must be citizens of their country of origin. ※ Applicants should not hold Korean citizenship. - Applicants should have adequate health, both mentally and physically, to stay in a foreign country for a long time. - Should be under 25 years of age at the date of entrance. (Undergraduate) - Should be under 40 years of age at the date of entrance. (Graduate) - Have finished or be scheduled to finish formal education of all elementary, middle, high school courses by the date of arrival. (Undergraduate) - Possess a grade point average (G.P.A.) above 80% from the last educational instit...
GKS-Documents New update    with Apostille and Authenticated              GKS-Scholarship is known as a scholarship program that allows all candidates to apply in two different ways. first, you can apply through the embassy in your respective country and you are either able to apply directly to the university that you prefer. but since NIIED has announced a new update of documents that needed to get apostilled or Authenticated from the embassy of your respective country. So all candidates need to submit those documents correctly in order to make their application qualified to be considered. Note: Maybe you also know that Cambodia doesn't have Apostilled Convention service for your documents, so if you still submit your documents without Apostilled your application will consider as disqualified for foreign documents. So how can make your documents be recognized? 1. Family's book and Birth certificate: From my experience, you must get those do...

How Fill and Prepare VISA Documents for GKS-Scholarship Graduate 2020

VISA Requirement Documents Here are VISA  requirement documents, D4 VISA for those who start with Korean Language Class. Korea Side  1. Copy of Korean School's Business License  This requirement is optional without school's business license you still able to apply for  VISA. but if you can get it from your Korean institution. it will help the Korean embassy in Cambodia easy to process your VISA. with the business license, the embassy needs to contact to your Korean institution as well for business license.  2. NIIED Invitation Letter  3. Certificate of Admission" For those who start their class without the Korean Language " Cambodian Side 1. Copy of Original of Latest Certificate 2. Original copy of Birth Certificate translate to English( Khmer and English) 3. Copy ID Card "Cambodian National Identity" and Passport with Original...