Creating an E-COM Application in Visual Basic

Friday, May 28, 2010

To create an E-Com application for online purchasing by using VB 6.0
Algorithm Procedure :
Part-1: ActiveX Control
Building a Simple ActiveX Control in VB IT1403 Software Component Lab
Steps to create data report and data environment: IT1403 Software Component Lab
Source Code Programming:
1. ActiveX Control
a) Fom1

Dim ms As Integer
Dim vb1 As Integer
Dim java As Integer

Private Sub Command1_Click()
Me.Hide
End Sub

Private Sub Form_Load()
ms = 400
vb1 = 100
java = 200
End Sub

Private Sub Text1_LostFocus()
Text4.Text = ms * Val(Text1.Text)
End Sub

Private Sub Text2_LostFocus()
Text5.Text = vb1 * Val(Text2.Text)
End Sub

Private Sub Text3_LostFocus()
Text6.Text = java * Val(Text3.Text)
End Sub

Private Sub Text4_Change()
Text7.Text = Val(Text7.Text) + Val(Text4.Text)
End Sub

Private Sub Text5_Change()
Text7.Text = Val(Text7.Text) + Val(Text5.Text)
End Sub

Private Sub Text6_Change()
Text7.Text = Val(Text7.Text) + Val(Text6.Text)
End Sub

b) Form 2 Source Code Programming
Dim mou As Integer
Dim key As Integer
Dim ram As Integer

Private Sub Command1_Click()
Me.Hide
End Sub

Private Sub Command3_Click()
Text8.Text = Val(Form1.Text7.Text) + Text7.Text
End Sub

Private Sub Form_Load()
mou = 250
key = 600
ram = 1200
End Sub

Private Sub Text1_LostFocus()
Text4.Text = mou * Val(Text1.Text)
End Sub

Private Sub Text2_LostFocus()
Text5.Text = key * Val(Text2.Text)
End Sub

Private Sub Text3_LostFocus()
Text6.Text = ram * Val(Text3.Text)
End Sub

Private Sub Text4_Change()
Text7.Text = Val(Text7.Text) + Val(Text4.Text)
End Sub

Private Sub Text5_Change()
Text7.Text = Val(Text7.Text) + Val(Text5.Text)
End Sub

Private Sub Text6_Change()
Text7.Text = Val(Text7.Text) + Val(Text6.Text)
End Sub

c) User Control Source Code Programming
Public Property Get total() As Double
total = Val(Form2.Text8.Text)
End Property

Private Sub Command1_Click()
Form1.Show
End Sub

Private Sub Command2_Click()
Form2.Show
End Sub

2. Standard Exe. IT1403 Software Component Lab Source code programming
A. Form 1
Private Sub Command1_Click()
Form2.Show


Me.Hide
End Sub

Private Sub Command2_Click()
End
End Sub

B. Form 2 Source Code Programming IT1403 Software Component Lab
Private Sub Command1_Click()
Form3.Text5.Text = UserControl11.total
Form3.Show
Me.Hide
End Sub

C. Form 3 Source Code Programming
Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text3.Text
Data1.Recordset.Fields(2) = Text5.Text
Data1.Recordset.Update
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
DataReport1.Show
End Sub

Private Sub Form_Load()
Text1.Text = Form1.Text1.Text
Text2.Text = Form1.Text2.Text
Text3.Text = Form1.Text3.Text
Text4.Text = Form1.Text4.Text
End Sub




How To create an E-Com application for online purchasing by using Visual Basic 6.0

0 comments:

Post a Comment