SlideShare una empresa de Scribd logo
1 de 97
-
2/2554
GUI Visual
Basic 2008
GUI
-–
–
1.
2.
1/2
1.
2.
2/2554
1
1.1
5
1.2
5
1.3 6
1.4
7
1.5
7
1.6 8
1.7
9
2
2.1 Visual Basic
10
2.2 Microsoft office Access 2007
21
3
3.1 MS Access 2007
28
3.2
32
3.3
36
4
4.1
72
5
5.1
80
5.2 80
1.1
Basic
Microsoft Office Access
Database server
1.2.
1.
2.
1.3.



















1.4
..
..
..
..
..
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3
-
--
6
1. Software
---
--
- Microsoft Windows 7
- Microsoft Visual Basic 2008
2. Hardware-
- NOTEBOOK Toshiba Sate
- Hard Disk 320 GB
- DDR RAMS 512 MB
- CD/RW ROM 52X Toshiba
- ATI Mobility Radeon Premium Graphics
- Monitor “14”
1.7
2
2.1 Visual Basic
BASIC Thomas Kurtz
Interpreter
GW-BASIC Interpreter
DOS
Sub Program
User Defind QUICK BASIC Visual Basic
QUICK
BASIC PDS BASIC Microsoft
BASIC Visual Basic
Visual Basic
Windows Visual
GUI : Graphic
User Interface) BASIC Beginner All-
Purpose Symbolic Instruction Code ) Visual
Basic VB Visaul Basic.net VB.NET)
Microsoft Visual Studio .NET)
Windows Operating System)
Dotnet Framework)
UML = Unified Modeling
Language) Visual Studio .NET)
IDE = Integrated Development Environment)
SQL Server) Visaul Basic.net VB.NET)
VC#) VJ#) VC++)
ASP .NET)
CLR = Common Language
Runtime)
Visual Basic Programming
Language)
Windows 95/98
Windows NT
Basic
Beginner’s All Purpose Symbolic Instruction
“ ” Basic
C).
Pascal) Fortian) Assembler)
Basic
MBASIC (Microsoft Basic). BASICA (Basic
Advanced): GWBASIC QuickBasic
Ms DOS
QBASIC
Text Mode
Windows
Windows
DOS
Text Mode
Basic
Windows
Visual Basic
Visual Basic 1.0
1991
GBASIC
Visual Basic
Visual Basic
(debugger)
(MDI)
Visual Basic Visual Studio 2010
2010
Object
Oriented Programming)
2.1.1 Visual Basic
Visual Basic
Visual Basic
1.
2. Basic
3.
4. Visual Basic
Visual Basic
Visual Basic
Visual Basic 2008 Visual
Basic 2008
Visual Basic
2005 Visual Basic
2008
Visual Basic 6 VB2008
Visual Basic 2008
Visual Basic 6
2.1.2 Visual Basic
2008
New project
2.1.2.1 Menu Bar
VB
Project
Build
Debug
Data
Format
2.1.2.2 Standard Toolbar
2.1.2.3 Solution Explorer
item
2.1.2.4 Properties
Object
2.1.2.5 Toolbox
Toolbox
Toolbox
Toolbox
toolbox 7
Common Controls
textbox
Containers
GroupBox Panel
Menu & ToolBars toolbar
Data
Components
Timer
, SerialPort
Printing
Dialogs Dialog
2.1.2.6 Run
Standard
Toolbar F5
2.1.3 Tool Box
Tool Box Control ( User Interface
(User Interface
2.1.3.1 code
View --> Code F7
2.1.3.2 Code
Public Class Form1 Class
Form1 class sub function
Code
2.1.3.4
File > new
project
dialog box 5
windows application
Windwos FormsApplication
Name: WindowsApplication1
MyFirstProgram
OK IDE Visual
Basic 6 Form common
controls toolbox, Solution explorer properties
button toolbox Form Calculate
calcuate source
code
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim num1, num2, sum As Single
num1 = 100
num2 = 200
sum = num1 + num2
MsgBox(" The Sum of " & num1 & " and " & num2 & " is "
& sum)
End Sub
play
)
2.2 Microsoft office Access 2007
Database System)
2.2.1
-
--
-
--
-
2.2.2 Access 2007
-
-
-
-
2.2.3
-
-
-
-
-
-
-
Normalization
- Data
Type)
- Relationship)
-
2.2.4 Access 2007
-
2.2.5 Access 2007
-
-
Table)
-
Query)
-
Form)
- Report)
PivotTable )
-
(Template) (Wizard)
-
Windows SharePoint Services
A c c e s s 2 0 0 7
Windows SharePoint Services Access 2007
2.2.6
1. Title Bar
2. Control Button
3. Quick Access Toolbar
4. Ribbon
Access
5. Office Button
6.
7. Design
View, Normal View
2.2.7
2.2.7.1 Form)
Form)
Table Datasheet)
2.2.7.2
-
-
-
-
----
VBA (Visual Basic for Applicatio
ns)
2.2.7.3 3
1.
2.
3.
2.2.7.4
1.
2. Create)
3. Form
2.2.7.5 Form Wizard )
1. Create)
2. More Form)
Form Wizard
3. tbl_product
4.
5. Next)
6. Columnar)
7. Next)
8.
9. Next)
10. Frm_product
11. Finish)
3.1.1 Ms Access 2007
id Text 255
name1 Text 255
add1 Text 255
tel Text 255
3 1.1
idcar Text 255
brand Text 255
gen Text 255
bortyear Text 255
price Number Integer
detailcar Text 255
num Number Integer
3 1.2
Idrent1 Text 255
Id Text 255
name Text 255
add Text 255
Tel Text 255
Idcar Text 255
Brand Text 255
Gen Text 255
bortyear Text 255
Price Number Integer
detailcar1 Text 255
amount Number Integer
pledeg Number Integer
Night Date/Time Long Date
status1 Text 255
3 1.3
Idreat Text 255
Idcar Text 255
Id Text 255
Amount Number Integer
Night Date/Time Long Date
3 1.4
3.2
Form4
Form1
Form9
Form6
3.3
FormCustomer
Fowchart
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox1.Enabled = True
If TextBox1.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
If ComboBox1.Text = " " Then
sql = "select * from customer where id='" & TextBox1.Text & "'"
With rs
.CommandType = CommandType.Text
.CommandText = sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox2.Text = dr.Item("id")
TextBox3.Text = dr.Item("name1")
TextBox4.Text = dr.Item("add1")
TextBox5.Text = dr.Item("tel")
Else
MessageBox.Show(" ")
Call Button5_Click(Nothing, Nothing)
End If
dr.Close()
Else
sql = "select * from customer where name1 like'%" &
TextBox1.Text & "%'"
With rs
.CommandType = CommandType.Text
.CommandText = sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox2.Text = dr.Item("id")
TextBox3.Text = dr.Item("name1")
TextBox4.Text = dr.Item("add1")
TextBox5.Text = dr.Item("tel")
Else
MessageBox.Show(" ")
Call Button5_Click(Nothing, Nothing)
End If
dr.Close()
End If
End Sub
Fowchart
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = ""
Or TextBox5.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
sql = "insert into customer(id,name1,add1,tel) values('" &
TextBox2.Text & "','" & TextBox3.Text & "' , '" & TextBox4.Text & "', '" &
TextBox5.Text & "')"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
Call Button5_Click(Nothing, Nothing)
End Sub
Fowchart
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
sql = "update customer set id='" & TextBox2.Text & "',name1='" &
TextBox3.Text & "', add1='" & TextBox4.Text & "', tel='" & TextBox5.Text &
"' where id='" & TextBox1.Text & "'"
With rs
.CommandText = sql
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
Call Button5_Click(Nothing, Nothing)
End Sub
Fowchart
No
Yes
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
If MessageBox.Show(" ", " OH CAR",
MessageBoxButtons.YesNo, MessageBoxIcon.Error) = MsgBoxResult.Yes Then
sql = "delete * from customer where id='" & TextBox1.Text & "'"
With rs
.CommandText = sql
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
Call Button5_Click(Nothing, Nothing)
Else
Exit Sub
End If
End Sub
Fowchart
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
Form Car
Fowchart
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If TextBox3.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
sql = "select * from car where idcar='" & TextBox3.Text & "'"
With rs
.CommandType = CommandType.Text
.CommandText = sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox1.Text = dr.Item("idcar")
ComboBox5.Text = dr.Item("brand")
ComboBox1.Text = dr.Item("gen")
ComboBox2.Text = dr.Item("bortyear")
TextBox5.Text = dr.Item("price")
TextBox2.Text = dr.Item("detailcar")
TextBox4.Text = dr.Item("num")
Else
MessageBox.Show(" ")
End If
dr.Close()
End Sub
Fowchart
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
If TextBox1.Text = "" Or ComboBox5.Text = "" Or ComboBox1.Text = ""
Or ComboBox2.Text = "" Or TextBox5.Text = "" Or TextBox2.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
sql = "insert into
car(idcar,brand,gen,bortyear,price,detailcar,num) values('" & TextBox1.Text
& "','" & ComboBox5.Text & "' ,"
sql &= " '" & ComboBox1.Text & "','" & ComboBox2.Text & "','" &
CInt(TextBox5.Text) & "', '" & TextBox2.Text & "','" & CInt(TextBox4.Text)
& "')"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
Call Button3_Click(Nothing, Nothing)
End Sub
Fowchart
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
sql = "update car set idcar='" & TextBox1.Text & "',brand='" &
ComboBox5.Text & "', gen= "
sql &= "'" & ComboBox1.Text & "', bortyear='" & ComboBox2.Text & "'
,price='" & CInt(TextBox5.Text) & "' "
sql &= ",detailcar='" & TextBox2.Text & "' ,num='" & TextBox4.Text
& "'where idcar='" & TextBox1.Text & "'"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
End Sub
Fowchart
No
Yes
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
ComboBox1.Text = ""
ComboBox2.Text = ""
TextBox5.Text = ""
ComboBox5.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
Form Rent
Fowchart
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If TextBox3.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
Sql = "select * from car where idcar='" & TextBox3.Text & "'"
With rs
.CommandType = CommandType.Text
.CommandText = Sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox1.ReadOnly = True
TextBox1.Text = dr.Item("idcar")
ComboBox5.Text = dr.Item("brand")
ComboBox1.Text = dr.Item("gen")
ComboBox2.Text = dr.Item("bortyear")
ComboBox4.Text = dr.Item("price")
TextBox2.Text = dr.Item("detailcar")
Else
MessageBox.Show(" ")
End If
dr.Close()
End Sub
Fowchart
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button7.Click
If TextBox12.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
sql = "select * from car where idcar='" & TextBox12.Text & "'"
With rs
.CommandType = CommandType.Text
.CommandText = sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox11.Text = dr.Item("idcar")
ComboBox5.Text = dr.Item("brand")
ComboBox1.Text = dr.Item("gen")
ComboBox2.Text = dr.Item("bortyear")
TextBox13.Text = dr.Item("price")
TextBox2.Text = dr.Item("detailcar")
tmp = dr.Item("num")
Else
MessageBox.Show(" ")
End If
dr.Close()
End Sub
Fowchart
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
If TextBox7.Text = "" Or ComboBox5.Text = "" Or ComboBox1.Text = ""
Or ComboBox2.Text = "" Or TextBox13.Text = "" Or TextBox11.Text = "" Or
TextBox6.Text = "" Or TextBox5.Text = "" Or TextBox4.Text = "" Or
TextBox3.Text = "" Or TextBox2.Text = "" Then
MessageBox.Show(" ")
Exit Sub
End If
sql = "insert into
rent1(idrent,id,name1,add1,tel,idcar,brand,gen,bortyear,price,detailcar1,am
ount,pledeg,night,status1)"
sql &= "values('" & TextBox7.Text & "','" & TextBox3.Text & "','" &
TextBox4.Text & "',"
sql &= "'" & TextBox5.Text & " ','" & TextBox6.Text & "','" &
TextBox11.Text & "',"
sql &= "'" & ComboBox5.Text & "', '" & ComboBox1.Text & "','" &
ComboBox2.Text & "',"
sql &= "'" & CInt(TextBox13.Text) & "','" & TextBox2.Text & "','" &
CInt(TextBox10.Text) & "',"
sql &= "'" & CInt(TextBox9.Text) & "','" &
DateTimePicker1.Value.ToLongDateString & "','1')"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
tmp = 0
sql = "update car set num='" & tmp & "' where idcar='" &
TextBox12.Text & "'"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
MessageBox.Show(" ", " ")
Call Button3_Click(Nothing, Nothing)
End Sub
Fowchart
No
Yes
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox4.Text = ""
ComboBox5.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Form Returns
Fowchart
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox2.Enabled = False
TextBox3.Enabled = False
TextBox4.Enabled = False
TextBox5.Enabled = False
If TextBox1.Text = "" Then
MsgBox(" ", MsgBoxStyle.Critical, " ")
Exit Sub
End If
sql = " select
rent1.id,rent1.idcar,rent1.amount,rent1.night,car.num from rent1,car where
rent1.idrent='" & TextBox1.Text & "'"
sql &= " and rent1.status1='1'"
sql &= " and rent1.idcar=car.idcar"
With rs
.CommandType = CommandType.Text
.CommandText = sql
.Connection = conn
dr = .ExecuteReader
End With
dr.Read()
If dr.HasRows Then
TextBox2.Text = dr.Item("id")
TextBox3.Text = dr.Item("idcar")
TextBox4.Text = dr.Item("amount")
TextBox5.Text = dr.Item("night")
tmp = dr.Item("num")
Else
MsgBox(" ", MsgBoxStyle.Exclamation,
" ")
End If
dr.Close()
End Sub
Fowchart
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
If TextBox1.Text = "" Or TextBox6.Text = "" Or TextBox7.Text = ""
Or TextBox8.Text = "" Then
MsgBox(" ")
Exit Sub
End If
sql = " update rent1 set status1='0'"
sql &= "where idrent = '" & TextBox1.Text & "'"
With rs
.Connection = conn
.CommandText = sql
.ExecuteNonQuery()
End With
tmp = CInt(TextBox4.Text) + tmp
sql = "Update car set num='" & tmp & "'"
sql &= " where idcar='" & TextBox3.Text & "'"
With rs
.Connection = conn
.CommandText = sql
.ExecuteNonQuery()
End With
sql = "insert into returns(idreat,idcar,id,amount,night)"
sql &= " values('" & TextBox1.Text & "','" & TextBox3.Text & "','"
& TextBox2.Text & "',"
sql &= "'" & CInt(TextBox4.Text) & "','" & TextBox5.Text & "')"
With rs
.CommandText = sql
.Connection = conn
.ExecuteNonQuery()
End With
MsgBox(" ")
Call Button4_Click(Nothing, Nothing)
End Sub
Fowchart
No
Yes
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
TextBox7.Clear()
End Sub
4.1 Form
1.
2.
3.
4.
5.
6.
1.
2.
3.
4.
5.
1.
2.
3.
1.
2.
3.
4.
5.
1.
2.
3.
4.
5.
1.
2.
1.
2.
1.
2.
3.
ICT
1.
2.
3.
–
–
http://th.carrenthatyai.com/
Visual Basic”
, " Advanced Visual
Basic 6.0",
, , 2548.
. : 1 2550
.
http://www.thaigoodview.com/library/teachershow/lopburi/c
hayamon_b/.
http://www.lks.ac.th/kuanjit/menu_vb.htm.
DVD 35
DVD 13
DVD 10

Más contenido relacionado

Destacado (15)

Ideate assignment
Ideate assignmentIdeate assignment
Ideate assignment
 
Internet setting for tata docomo in eduboss
Internet setting for tata docomo in edubossInternet setting for tata docomo in eduboss
Internet setting for tata docomo in eduboss
 
D school assignment 1 empathise and define
D school assignment 1 empathise and defineD school assignment 1 empathise and define
D school assignment 1 empathise and define
 
Hprec5.3
Hprec5.3Hprec5.3
Hprec5.3
 
Presentation ep
Presentation epPresentation ep
Presentation ep
 
Aratt firenza| Flats in Electronic City By Arattukulam Developers
Aratt firenza| Flats in Electronic City By Arattukulam DevelopersAratt firenza| Flats in Electronic City By Arattukulam Developers
Aratt firenza| Flats in Electronic City By Arattukulam Developers
 
TeRento.mx
TeRento.mxTeRento.mx
TeRento.mx
 
Slide share
Slide shareSlide share
Slide share
 
pollution
pollutionpollution
pollution
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
ac-broc
ac-brocac-broc
ac-broc
 
Films from the Southern Mediterranean Brochure 2013
Films from the Southern Mediterranean Brochure 2013Films from the Southern Mediterranean Brochure 2013
Films from the Southern Mediterranean Brochure 2013
 
Michael pivola artwork file powerpoint
Michael pivola artwork file  powerpointMichael pivola artwork file  powerpoint
Michael pivola artwork file powerpoint
 
Quantum sukses.pdfx
Quantum sukses.pdfxQuantum sukses.pdfx
Quantum sukses.pdfx
 
Pre-launching plots and villas in Bangalore| Aratt Amora by Arattukulam Devel...
Pre-launching plots and villas in Bangalore| Aratt Amora by Arattukulam Devel...Pre-launching plots and villas in Bangalore| Aratt Amora by Arattukulam Devel...
Pre-launching plots and villas in Bangalore| Aratt Amora by Arattukulam Devel...
 

Similar a โครงการ 5 บท

Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaYusman Kurniadi
 
Inventory management
Inventory managementInventory management
Inventory managementRajeev Sharan
 
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...Dr. Volkan OBAN
 
[FT-7][snowmantw] How to make a new functional language and make the world be...
[FT-7][snowmantw] How to make a new functional language and make the world be...[FT-7][snowmantw] How to make a new functional language and make the world be...
[FT-7][snowmantw] How to make a new functional language and make the world be...Functional Thursday
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functionsSveta Smirnova
 
The Ring programming language version 1.5.3 book - Part 27 of 184
The Ring programming language version 1.5.3 book - Part 27 of 184The Ring programming language version 1.5.3 book - Part 27 of 184
The Ring programming language version 1.5.3 book - Part 27 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181Mahmoud Samir Fayed
 
Vb.net Experiment with Example
Vb.net Experiment with ExampleVb.net Experiment with Example
Vb.net Experiment with ExampleVivek Kumar Sinha
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & EngineeringEelco Visser
 
The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196Mahmoud Samir Fayed
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185Mahmoud Samir Fayed
 
Basic NLP with Python and NLTK
Basic NLP with Python and NLTKBasic NLP with Python and NLTK
Basic NLP with Python and NLTKFrancesco Bruni
 
The Ring programming language version 1.8 book - Part 32 of 202
The Ring programming language version 1.8 book - Part 32 of 202The Ring programming language version 1.8 book - Part 32 of 202
The Ring programming language version 1.8 book - Part 32 of 202Mahmoud Samir Fayed
 

Similar a โครงการ 5 บท (20)

Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
 
Inventory management
Inventory managementInventory management
Inventory management
 
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...Produce nice outputs for graphical, tabular and textual reporting in R-Report...
Produce nice outputs for graphical, tabular and textual reporting in R-Report...
 
[FT-7][snowmantw] How to make a new functional language and make the world be...
[FT-7][snowmantw] How to make a new functional language and make the world be...[FT-7][snowmantw] How to make a new functional language and make the world be...
[FT-7][snowmantw] How to make a new functional language and make the world be...
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functions
 
The Ring programming language version 1.5.3 book - Part 27 of 184
The Ring programming language version 1.5.3 book - Part 27 of 184The Ring programming language version 1.5.3 book - Part 27 of 184
The Ring programming language version 1.5.3 book - Part 27 of 184
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181
 
CRUD VB2010
CRUD VB2010CRUD VB2010
CRUD VB2010
 
Vb.net Experiment with Example
Vb.net Experiment with ExampleVb.net Experiment with Example
Vb.net Experiment with Example
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & Engineering
 
The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Ditec esoft C# project
Ditec esoft C# projectDitec esoft C# project
Ditec esoft C# project
 
Ditec esoft C# project
Ditec esoft C# project Ditec esoft C# project
Ditec esoft C# project
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Basic NLP with Python and NLTK
Basic NLP with Python and NLTKBasic NLP with Python and NLTK
Basic NLP with Python and NLTK
 
The Ring programming language version 1.8 book - Part 32 of 202
The Ring programming language version 1.8 book - Part 32 of 202The Ring programming language version 1.8 book - Part 32 of 202
The Ring programming language version 1.8 book - Part 32 of 202
 

Más de MareenaHahngeh

ขั้นตอนการสร้าง Presentation กับโปรแกรม go animate
ขั้นตอนการสร้าง Presentation กับโปรแกรม go animateขั้นตอนการสร้าง Presentation กับโปรแกรม go animate
ขั้นตอนการสร้าง Presentation กับโปรแกรม go animateMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บทMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอMareenaHahngeh
 
บทที่ 3 การใช้งานคอนโทรล
บทที่ 3 การใช้งานคอนโทรลบทที่ 3 การใช้งานคอนโทรล
บทที่ 3 การใช้งานคอนโทรลMareenaHahngeh
 

Más de MareenaHahngeh (19)

ขั้นตอนการสร้าง Presentation กับโปรแกรม go animate
ขั้นตอนการสร้าง Presentation กับโปรแกรม go animateขั้นตอนการสร้าง Presentation กับโปรแกรม go animate
ขั้นตอนการสร้าง Presentation กับโปรแกรม go animate
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
Slidesnack
SlidesnackSlidesnack
Slidesnack
 
Slidesnack
SlidesnackSlidesnack
Slidesnack
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
Slide share
Slide shareSlide share
Slide share
 
โครงการ 5 บท
โครงการ 5 บทโครงการ 5 บท
โครงการ 5 บท
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
งานนำเสนอ
งานนำเสนองานนำเสนอ
งานนำเสนอ
 
Doc1
Doc1Doc1
Doc1
 
Doc1
Doc1Doc1
Doc1
 
บท6
บท6บท6
บท6
 
โค้ด
โค้ดโค้ด
โค้ด
 
Doc1
Doc1Doc1
Doc1
 
บทที่ 3 การใช้งานคอนโทรล
บทที่ 3 การใช้งานคอนโทรลบทที่ 3 การใช้งานคอนโทรล
บทที่ 3 การใช้งานคอนโทรล
 

Último

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

โครงการ 5 บท

  • 2.
  • 6. 1 1.1 5 1.2 5 1.3 6 1.4 7 1.5 7 1.6 8 1.7 9 2 2.1 Visual Basic 10 2.2 Microsoft office Access 2007 21 3
  • 7. 3.1 MS Access 2007 28 3.2 32 3.3 36 4 4.1 72 5 5.1 80 5.2 80
  • 12. - Microsoft Windows 7 - Microsoft Visual Basic 2008 2. Hardware- - NOTEBOOK Toshiba Sate - Hard Disk 320 GB - DDR RAMS 512 MB - CD/RW ROM 52X Toshiba - ATI Mobility Radeon Premium Graphics - Monitor “14”
  • 13. 1.7
  • 14. 2 2.1 Visual Basic BASIC Thomas Kurtz Interpreter GW-BASIC Interpreter DOS Sub Program User Defind QUICK BASIC Visual Basic
  • 15. QUICK BASIC PDS BASIC Microsoft BASIC Visual Basic Visual Basic Windows Visual GUI : Graphic User Interface) BASIC Beginner All- Purpose Symbolic Instruction Code ) Visual Basic VB Visaul Basic.net VB.NET) Microsoft Visual Studio .NET) Windows Operating System) Dotnet Framework) UML = Unified Modeling Language) Visual Studio .NET) IDE = Integrated Development Environment) SQL Server) Visaul Basic.net VB.NET) VC#) VJ#) VC++) ASP .NET)
  • 16. CLR = Common Language Runtime) Visual Basic Programming Language) Windows 95/98 Windows NT Basic Beginner’s All Purpose Symbolic Instruction “ ” Basic C). Pascal) Fortian) Assembler) Basic MBASIC (Microsoft Basic). BASICA (Basic Advanced): GWBASIC QuickBasic Ms DOS QBASIC Text Mode Windows Windows DOS Text Mode
  • 17. Basic Windows Visual Basic Visual Basic 1.0 1991 GBASIC Visual Basic Visual Basic (debugger) (MDI) Visual Basic Visual Studio 2010 2010 Object Oriented Programming) 2.1.1 Visual Basic
  • 18. Visual Basic Visual Basic 1. 2. Basic 3. 4. Visual Basic Visual Basic Visual Basic
  • 19. Visual Basic 2008 Visual Basic 2008 Visual Basic 2005 Visual Basic 2008 Visual Basic 6 VB2008 Visual Basic 2008 Visual Basic 6
  • 20. 2.1.2 Visual Basic 2008 New project 2.1.2.1 Menu Bar VB Project
  • 23. toolbox 7 Common Controls textbox Containers GroupBox Panel Menu & ToolBars toolbar Data Components Timer
  • 24. , SerialPort Printing Dialogs Dialog 2.1.2.6 Run Standard Toolbar F5 2.1.3 Tool Box Tool Box Control ( User Interface (User Interface
  • 25. 2.1.3.1 code View --> Code F7 2.1.3.2 Code Public Class Form1 Class Form1 class sub function
  • 27. dialog box 5 windows application Windwos FormsApplication Name: WindowsApplication1 MyFirstProgram OK IDE Visual Basic 6 Form common controls toolbox, Solution explorer properties
  • 28. button toolbox Form Calculate
  • 29. calcuate source code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim num1, num2, sum As Single num1 = 100 num2 = 200 sum = num1 + num2 MsgBox(" The Sum of " & num1 & " and " & num2 & " is " & sum) End Sub
  • 31. 2.2 Microsoft office Access 2007 Database System)
  • 34. - 2.2.5 Access 2007 - - Table) - Query) - Form) - Report) PivotTable ) - (Template) (Wizard) - Windows SharePoint Services A c c e s s 2 0 0 7
  • 35. Windows SharePoint Services Access 2007 2.2.6 1. Title Bar 2. Control Button 3. Quick Access Toolbar 4. Ribbon Access 5. Office Button 6.
  • 36. 7. Design View, Normal View 2.2.7 2.2.7.1 Form) Form) Table Datasheet) 2.2.7.2 - - - -
  • 37. ---- VBA (Visual Basic for Applicatio ns) 2.2.7.3 3 1. 2. 3. 2.2.7.4 1. 2. Create) 3. Form 2.2.7.5 Form Wizard )
  • 38. 1. Create) 2. More Form) Form Wizard 3. tbl_product 4. 5. Next)
  • 41. id Text 255 name1 Text 255 add1 Text 255 tel Text 255 3 1.1
  • 42. idcar Text 255 brand Text 255 gen Text 255 bortyear Text 255 price Number Integer detailcar Text 255 num Number Integer 3 1.2
  • 43. Idrent1 Text 255 Id Text 255 name Text 255 add Text 255 Tel Text 255 Idcar Text 255 Brand Text 255 Gen Text 255 bortyear Text 255 Price Number Integer detailcar1 Text 255 amount Number Integer pledeg Number Integer Night Date/Time Long Date status1 Text 255 3 1.3
  • 44. Idreat Text 255 Idcar Text 255 Id Text 255 Amount Number Integer Night Date/Time Long Date 3 1.4
  • 46. Form1
  • 47. Form9
  • 48. Form6
  • 51. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Enabled = True If TextBox1.Text = "" Then MessageBox.Show(" ") Exit Sub End If If ComboBox1.Text = " " Then sql = "select * from customer where id='" & TextBox1.Text & "'" With rs .CommandType = CommandType.Text .CommandText = sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then TextBox2.Text = dr.Item("id") TextBox3.Text = dr.Item("name1") TextBox4.Text = dr.Item("add1") TextBox5.Text = dr.Item("tel") Else MessageBox.Show(" ") Call Button5_Click(Nothing, Nothing) End If dr.Close() Else sql = "select * from customer where name1 like'%" & TextBox1.Text & "%'" With rs .CommandType = CommandType.Text .CommandText = sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then TextBox2.Text = dr.Item("id") TextBox3.Text = dr.Item("name1") TextBox4.Text = dr.Item("add1") TextBox5.Text = dr.Item("tel") Else MessageBox.Show(" ") Call Button5_Click(Nothing, Nothing) End If dr.Close() End If End Sub
  • 53. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then MessageBox.Show(" ") Exit Sub End If sql = "insert into customer(id,name1,add1,tel) values('" & TextBox2.Text & "','" & TextBox3.Text & "' , '" & TextBox4.Text & "', '" & TextBox5.Text & "')" With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With MessageBox.Show(" ", " ") Call Button5_Click(Nothing, Nothing) End Sub
  • 55. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click sql = "update customer set id='" & TextBox2.Text & "',name1='" & TextBox3.Text & "', add1='" & TextBox4.Text & "', tel='" & TextBox5.Text & "' where id='" & TextBox1.Text & "'" With rs .CommandText = sql .ExecuteNonQuery() End With MessageBox.Show(" ", " ") Call Button5_Click(Nothing, Nothing) End Sub
  • 57. Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If MessageBox.Show(" ", " OH CAR", MessageBoxButtons.YesNo, MessageBoxIcon.Error) = MsgBoxResult.Yes Then sql = "delete * from customer where id='" & TextBox1.Text & "'" With rs .CommandText = sql .ExecuteNonQuery() End With MessageBox.Show(" ", " ") Call Button5_Click(Nothing, Nothing) Else Exit Sub End If End Sub
  • 59. Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" End Sub
  • 62. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox3.Text = "" Then MessageBox.Show(" ") Exit Sub End If sql = "select * from car where idcar='" & TextBox3.Text & "'" With rs .CommandType = CommandType.Text .CommandText = sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then TextBox1.Text = dr.Item("idcar") ComboBox5.Text = dr.Item("brand") ComboBox1.Text = dr.Item("gen") ComboBox2.Text = dr.Item("bortyear") TextBox5.Text = dr.Item("price") TextBox2.Text = dr.Item("detailcar") TextBox4.Text = dr.Item("num") Else MessageBox.Show(" ") End If dr.Close() End Sub
  • 64. Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If TextBox1.Text = "" Or ComboBox5.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or TextBox5.Text = "" Or TextBox2.Text = "" Then MessageBox.Show(" ") Exit Sub End If sql = "insert into car(idcar,brand,gen,bortyear,price,detailcar,num) values('" & TextBox1.Text & "','" & ComboBox5.Text & "' ," sql &= " '" & ComboBox1.Text & "','" & ComboBox2.Text & "','" & CInt(TextBox5.Text) & "', '" & TextBox2.Text & "','" & CInt(TextBox4.Text) & "')" With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With MessageBox.Show(" ", " ") Call Button3_Click(Nothing, Nothing) End Sub
  • 66. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click sql = "update car set idcar='" & TextBox1.Text & "',brand='" & ComboBox5.Text & "', gen= " sql &= "'" & ComboBox1.Text & "', bortyear='" & ComboBox2.Text & "' ,price='" & CInt(TextBox5.Text) & "' " sql &= ",detailcar='" & TextBox2.Text & "' ,num='" & TextBox4.Text & "'where idcar='" & TextBox1.Text & "'" With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With MessageBox.Show(" ", " ") End Sub
  • 68. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ComboBox1.Text = "" ComboBox2.Text = "" TextBox5.Text = "" ComboBox5.Text = "" TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" End Sub
  • 71. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox3.Text = "" Then MessageBox.Show(" ") Exit Sub End If Sql = "select * from car where idcar='" & TextBox3.Text & "'" With rs .CommandType = CommandType.Text .CommandText = Sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then TextBox1.ReadOnly = True TextBox1.Text = dr.Item("idcar") ComboBox5.Text = dr.Item("brand") ComboBox1.Text = dr.Item("gen") ComboBox2.Text = dr.Item("bortyear") ComboBox4.Text = dr.Item("price") TextBox2.Text = dr.Item("detailcar") Else MessageBox.Show(" ") End If dr.Close() End Sub
  • 73. Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If TextBox12.Text = "" Then MessageBox.Show(" ") Exit Sub End If sql = "select * from car where idcar='" & TextBox12.Text & "'" With rs .CommandType = CommandType.Text .CommandText = sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then TextBox11.Text = dr.Item("idcar") ComboBox5.Text = dr.Item("brand") ComboBox1.Text = dr.Item("gen") ComboBox2.Text = dr.Item("bortyear") TextBox13.Text = dr.Item("price") TextBox2.Text = dr.Item("detailcar") tmp = dr.Item("num") Else MessageBox.Show(" ") End If dr.Close() End Sub
  • 75. Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If TextBox7.Text = "" Or ComboBox5.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or TextBox13.Text = "" Or TextBox11.Text = "" Or TextBox6.Text = "" Or TextBox5.Text = "" Or TextBox4.Text = "" Or TextBox3.Text = "" Or TextBox2.Text = "" Then MessageBox.Show(" ") Exit Sub End If sql = "insert into rent1(idrent,id,name1,add1,tel,idcar,brand,gen,bortyear,price,detailcar1,am ount,pledeg,night,status1)" sql &= "values('" & TextBox7.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "'," sql &= "'" & TextBox5.Text & " ','" & TextBox6.Text & "','" & TextBox11.Text & "'," sql &= "'" & ComboBox5.Text & "', '" & ComboBox1.Text & "','" & ComboBox2.Text & "'," sql &= "'" & CInt(TextBox13.Text) & "','" & TextBox2.Text & "','" & CInt(TextBox10.Text) & "'," sql &= "'" & CInt(TextBox9.Text) & "','" & DateTimePicker1.Value.ToLongDateString & "','1')"
  • 76. With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With tmp = 0 sql = "update car set num='" & tmp & "' where idcar='" & TextBox12.Text & "'" With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With MessageBox.Show(" ", " ") Call Button3_Click(Nothing, Nothing) End Sub Fowchart
  • 77. No Yes Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ComboBox1.Text = "" ComboBox2.Text = "" ComboBox4.Text = "" ComboBox5.Text = "" TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" End Sub
  • 80. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox2.Enabled = False TextBox3.Enabled = False TextBox4.Enabled = False TextBox5.Enabled = False If TextBox1.Text = "" Then MsgBox(" ", MsgBoxStyle.Critical, " ") Exit Sub End If sql = " select rent1.id,rent1.idcar,rent1.amount,rent1.night,car.num from rent1,car where rent1.idrent='" & TextBox1.Text & "'" sql &= " and rent1.status1='1'" sql &= " and rent1.idcar=car.idcar" With rs .CommandType = CommandType.Text .CommandText = sql .Connection = conn dr = .ExecuteReader End With dr.Read() If dr.HasRows Then
  • 81. TextBox2.Text = dr.Item("id") TextBox3.Text = dr.Item("idcar") TextBox4.Text = dr.Item("amount") TextBox5.Text = dr.Item("night") tmp = dr.Item("num") Else MsgBox(" ", MsgBoxStyle.Exclamation, " ") End If dr.Close() End Sub Fowchart
  • 82. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If TextBox1.Text = "" Or TextBox6.Text = "" Or TextBox7.Text = "" Or TextBox8.Text = "" Then MsgBox(" ") Exit Sub End If sql = " update rent1 set status1='0'" sql &= "where idrent = '" & TextBox1.Text & "'" With rs .Connection = conn .CommandText = sql .ExecuteNonQuery() End With tmp = CInt(TextBox4.Text) + tmp sql = "Update car set num='" & tmp & "'" sql &= " where idcar='" & TextBox3.Text & "'" With rs .Connection = conn .CommandText = sql .ExecuteNonQuery() End With sql = "insert into returns(idreat,idcar,id,amount,night)" sql &= " values('" & TextBox1.Text & "','" & TextBox3.Text & "','" & TextBox2.Text & "',"
  • 83. sql &= "'" & CInt(TextBox4.Text) & "','" & TextBox5.Text & "')" With rs .CommandText = sql .Connection = conn .ExecuteNonQuery() End With MsgBox(" ") Call Button4_Click(Nothing, Nothing) End Sub Fowchart No
  • 84. Yes Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() End Sub
  • 91. 1. 2.
  • 92. 1. 2.
  • 94.
  • 96. – – http://th.carrenthatyai.com/ Visual Basic” , " Advanced Visual Basic 6.0", , , 2548. . : 1 2550 . http://www.thaigoodview.com/library/teachershow/lopburi/c hayamon_b/.