0% found this document useful (0 votes)
9 views3 pages

Dasar VB GBR

The document contains two Visual Basic forms: one for a welcome message and another for basic arithmetic operations. The first form allows users to clear input fields, display a welcome message, and populate combo and list boxes with options. The second form performs addition, subtraction, multiplication, and division based on user input and also includes a clear functionality.

Uploaded by

liusuri084
Copyright
© © All Rights Reserved
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)
9 views3 pages

Dasar VB GBR

The document contains two Visual Basic forms: one for a welcome message and another for basic arithmetic operations. The first form allows users to clear input fields, display a welcome message, and populate combo and list boxes with options. The second form performs addition, subtraction, multiplication, and division based on user input and also includes a clear functionality.

Uploaded by

liusuri084
Copyright
© © All Rights Reserved
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/ 3

KODING FORM SELAMAT DATANG:

Public Class Form1

Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click


txt1.Text = ""
txt2.Text = ""
lbl1.Text = ""
cmb1.Text = ""
cmb1.Items.Clear()
lst1.Items.Clear()

End Sub

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click


End
End Sub

Private Sub btnHasil_Click(sender As Object, e As EventArgs) Handles btnHasil.Click


txt2.Text = "Selamat Datang di Visual Basic 2015"
lbl1.Text = "Ayoo Belajar Visual Basic 2015"

With cmb1
.Items.Add("Text Box")
.Items.Add("Label")
.Items.Add("Combo Box")
.Items.Add("List Box")
End With

With lst1
.Items.Add("Text Box")
.Items.Add("Label")
.Items.Add("Combo Box")
.Items.Add("List Box")
End With
End Sub
End Class
______________________________________________________________________________________

KODING FORM SELAMAT DATANG:


Public Class matematikadsr
Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
txtjlh1.Text = ""
txtjlh2.Text = ""
txtjlhtotal.Text = ""
txtkurang1.Text = ""
txtkurang2.Text = ""
txtkurangtotal.Text = ""
txtkali1.Text = ""
txtkali2.Text = ""
txtkalitotal.Text = ""
txtbagi1.Text = ""
txtbagi2.Text = ""
txtbagitotal.Text = ""
End Sub

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click


End
End Sub

Private Sub btnProses_Click(sender As Object, e As EventArgs) Handles


btnProses.Click

txtjlhtotal.Text = Val(txtjlh1.Text) + Val(txtjlh2.Text)


txtkurangtotal.Text = txtkurang1.Text - txtkurang2.Text
txtkalitotal.Text = txtkali1.Text * txtkali2.Text
txtbagitotal.Text = txtbagi1.Text / txtbagi2.Text
End Sub

Private Sub matematikadsr_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
txtjlh1.Text = 0
txtjlh2.Text = 0
txtkurang1.Text = 0
txtkurang2.Text = 0
txtkali1.Text = 0
txtkali2.Text = 0
txtbagi1.Text = 0
txtbagi2.Text = 0
End Sub
End Class

You might also like