Music
Music  


HOME

Music

หลักการเขียน VB

Music

Homework

Music

Webboard

Music

About Friends

Music

Profile

Music

Music

   
Music
Music
Main Menu
ตารางเรียนภารเรียนที่2/52

Musicหลักการเขียน VB

รู้จัก.NET Framework
แนะนำภาษา Visual Basic
ความรู้พื้นฐาน VB2005
การควบคุมทิศทางของโปรแกรม
การตรวจสอบแก้ไขข้อผิดพลาด

ใบงานที่ 1: หลักการเขียนโปรแกรม

ใบงานที่ 2: ตัวดำเนินการและนิพจน์
ใบงานที่ 3: การเขียนโปรแกรม VB
sports booksHomework
Form
Grad
ร้านก๊วยเตี๊ยว
Factorial
ฟังก์ชันคำนวณ
Test
Menustrip
Webboard
About Friends
Profile

การบ้าน : งาน Form

form1

 

 

Public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CenterToScreen()
Label1.Text = "ป้อนค่าที่ 1"
Label2.Text = "ป้อนค่าที่ 2"
TextBox1.Text = "15"
TextBox2.Text = "5"
RadioButton1.Text = "บวก"
RadioButton2.Text = "ลบ"
RadioButton3.Text = "คูณ"
RadioButton4.Text = "หาร"
RadioButton1.Checked = True
Button1.Text = "คำนวณ"
Button2.Text = "ล้าง"
Label4.Text = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b As Integer
Dim r As Single
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
If RadioButton1.Checked = True Then
r = a + b
End If
If RadioButton2.Checked = True Then
r = a - b
End If
If RadioButton3.Checked = True Then
r = a * b
End If
If RadioButton4.Checked = True Then
r = a / b
End If
Label4.Text = Format(r, "###,##0.00")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Enabled = True
TextBox2.Enabled = True
Button1.Enabled = True
Button2.Enabled = False
Label2.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
End Class


Top


  
Form1
Form2
Form3
จำนวนผู้เยี่ยมชมเวบ
count internet traffic
Music Music
Free Web Hosting