Ssaya Beberapa Hari ini disuruh Guru Saya muhammadyani.com Untuk Membuat Kalkulator Sederhana , Dan Tampilanya pun juga Disuruh Bebas,, Berikut kalkulator Sderhana Saya Yang Udah Saya Buat.
1. Form 1
Berikut Ada Lah Code-code Nya :
Public Class Tugas
Private Property DataTableClearEventArgs As Boolean
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs)
Process.Start("https://smkti.net")
End Sub
Private Sub rbtn1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtn1.CheckedChanged
Label7.Text = "+"
txthasil.Text = Val(txt1.Text) + Val(txt2.Text)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Close()
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtn2.CheckedChanged
Label7.Text = "-"
txthasil.Text = Val(txt1.Text) - Val(txt2.Text)
End Sub
Private Sub rbtn3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtn3.CheckedChanged
Label7.Text = "x"
txthasil.Text = Val(txt1.Text) * Val(txt2.Text)
End Sub
Private Sub rbtn4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtn4.CheckedChanged
Label7.Text = "/"
txthasil.Text = Val(txt1.Text) / Val(txt2.Text)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Refreshing.Show()
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
txt1.Clear()
txt2.Clear()
txthasil.Clear()
End Sub
Private Sub Tugas_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MsgBox("WELCOME ( Tekan Ok Untuk Lanjut :v )")
End Sub
2. Form 3 ( About Me ) :
Berikut Code-Code Nya :
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Close()
End Sub
Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
Process.Start("https://facebook.com/Muhammad.reza.padillah")
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("https://twitter.com/_pemula_")
End Sub
End Class
3. Form Refreshing :
Berikut Adalah Code-codenya :
Public Class Refreshing
Private Sub Button1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
If Button1.Top > 150 Then
Button1.Top = 50
ElseIf Button1.Top <= 150 Then
Button1.Top = 300
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Close()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
End Class
Walaikumsallam Wr.Wb Semoga Postingan Saya kali Ini Bermanfaat Bagi Teman Semua yang Ingin Menyoba Vb.Net Dengan Membuat Aplikasi Sederhana ...
...\Sekian Dan terima Kasih/...
0 comments:
Post a Comment