21
This is not for beginners Written and Designed By Mark John P. Lado

This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Embed Size (px)

Citation preview

Page 1: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

This is not for

beginners

Written and Designed

By

Mark John P. Lado

Page 2: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

“This is not for beginners”

Written and Designed by

Mark John P. Lado

Anyone can share this e-Book without any cost; I am not

responsible for any reason of the person who paid some

amount to get a copy. The only payable is the editable

project application which is the .vbp format.

Images Credits to the owner.

The e-Book is compiled with the actual program. If you got this e-book

from online like Google Play Books and www.slideshare.net it does not contain

the actual exe program. To get the program contact me thru the

numbers I provide.

For some concerns you can have a direct call on me through this number

+63 942.372.4344

Developed by MJLADO Software’s

Page 3: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Table of contents

Title pages

Acknowledgement i

Introduction ii

Functions iii

Part I INTERFACE AND SOURCE CODE

Progress Bar 2

Login Credentials 3

The interior 4

Add New Window 5

Developer’s window 6

Database window 7

PART II Message to the Reader

Message 8

Page 4: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

ACKNOWLEDGEMENT First and foremost to our Almighty God for giving me strength every day for the guidance and good health, for the graces and blessings that help me in making the project possible. And most of all to my parents and guardians, thank you for showing your unconditional love and unending support financially and spiritually.

i

Page 5: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

INTRODUCTION

Being a student it is a part of the school curricula to undergo a Capstone project. For us to able to expose our ideas, knowledge and theories to the field in which we are going to experience. The e-Book contains programming codes which is written in VB6 or the Visual Basic 6.0.

ii

Page 6: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

FUNCTIONS This executed application is a beta version where the reader can get some ideas in performing the

project. The applications contains several codes and techniques in enhancing the interface, the project

contains progress bar, login credentials and the database where data are stored. This e-Book contains

screen shots of the actual program and their respective source code.

iii

Page 7: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

INTERFACE AND SOURCE CODE

Page 8: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Progress Bar – this is the first window pops up when you open the program.

Figure 1

Code:

Private Sub Form_Load()

Timer1.Enabled = True

End Sub

Private Sub Timer1_Timer()

Timer1.Interval = Rnd * 300 + 10

ProgressBar1.Value = ProgressBar1.Value + 2

Label1.Caption = ProgressBar1.Value & "% Loading...."

If Label1.Caption = 100 & "% Loading...." Then

Form2.Show

Unload Me

End If

End Sub

2

Page 9: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Login Credentials – after the progress bar goes to 100% Loading, this window will automatically

splash. You can see in the code that there is an Adodc where I use in connecting the database

and it is hidden. You can watch some tutorials online to do so.

Figure 2

Code:

Adodc1.RecordSource = "Select * from LOGINFORM"

Adodc1.Refresh

With Adodc1.Recordset

.MoveFirst

While Not .EOF

Combo1.AddItem .Fields![UserName]

.MoveNext

Wend

End With

End Sub

3

Page 10: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Private Sub Image1_Click()

Combo1.SetFocus

On Error Resume Next

With Adodc1.Recordset

.MoveFirst

.Find "[USERNAME]='" & Combo1.Text & "'"

If .EOF Then

MsgBox "User not recognized!", vbCritical, "Error"

ElseIf Text1.Text = .Fields![Password] Then

MsgBox "Login success!", vbInformation, "MJLADO Softwares 2016"

Unload Me

Form3.Show

Else

MsgBox "Invalid password!", vbCritical, "Error"

End If

End With

End Sub

Private Sub Image2_Click()

Unload Me

End Sub

Page 11: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

The interior – When you put your mouse on the icon the text will splash. Check figure 4 and figure 5.

Figure 3

4

Page 12: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Figure 4

Page 13: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Figure 5

Page 14: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Code:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = False

Label2.Visible = False

Label3.Visible = False

Label4.Visible = False

End Sub

Private Sub Image1_Click()

Unload Me

Form2.Show

End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = True

End Sub

Private Sub Image2_Click()

Unload Me

Form4.Show

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label2.Visible = True

End Sub

Private Sub Image3_Click()

Unload Me

Form5.Show

End Sub

Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label3.Visible = True

End Sub

Private Sub Image4_Click()

Unload Me

Form6.Show

End Sub

Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label4.Visible = True

End Su

Page 15: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Add New Window - When you click the first icon, refer figure 3, 4 and 5 and this window will splash. To

go back, simply click the house icon.

Figure 6

5

Page 16: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Code:

Private Sub AddNew_Click()

Unload Me

Form4.Show

End Sub

Private Sub Check1_Click()

Adodc1.Recordset.AddNew

End Sub

Private Sub DelButton_Click()

confirmation = MsgBox("Are you sure", vbYesNo + vbCritical, "Delete confirmation.")

If confirmation = vbYes Then

Adodc1.Recordset.Delete

MsgBox "Login Credentials Deleted Successfully", vbInformation, "MJLADO SOtwares 2016"

Else

MsgBox " Credentials not deleted! ", vbInformation, "MJLADO SOtwares 2016"

End If

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = False

End Sub

Private Sub Image1_Click()

Unload Me

Form3.Show

End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = True

End Sub

Private Sub UpdateButton_Click()

Adodc1.Recordset.Fields("Username") = Text1.Text

Adodc1.Recordset.Fields("Password") = Text2.Text

If Check1.Value = False Then

MsgBox "Please check the CheckBox", vbInformation, "MJLADO SOtwares 2016"

End If

End Sub

Page 17: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Developer’s window - When you click the Second icon, refer figure 3, 4 and 5 and this window will

splash. To go back, simply click the house icon.

Figure 7

6

Page 18: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Code:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = False

Label2.Visible = False

End Sub

Private Sub Image1_Click()

Unload Me

Form3.Show

End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = True

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label2.Visible = True

End Sub

Page 19: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Database window - When you click the Third icon, refer figure 3, 4 and 5 and this window will splash. To

go back, simply click the house icon.

Figure 8

Code:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = False

Label2.Visible = False

End Sub

Private Sub Image1_Click()

Unload Me

Form3.Show

End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label1.Visible = True

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Label2.Visible = True

End Sub

7

Page 20: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

Message to the Reader

Page 21: This is not for beginners - Visual Basic 6.0 or VB6 by MJLADO

From: MJLADO Software’s

To: Readers

Thank you for reading the e-Book. I hope that you got some ideas. To fully understand the

flow, you can have the actual editable project program of this e-Book and it only cost 3.33

US Dollar (Convert it in Philippine Peso), get it now! The program contains database table and

Image sources.

----END---

8