CodesChart Batch File C++ Flowchart VB6 Others About Privacy Policy

Saturday, October 7, 2017

Simple Projects in VB 6 Part 1

Here, I once again coming back to share some good stuff. On this post I will Share About Simple Projects in VB 6.0. We can also call it as MVP so what is MVP? MVP is "Minimal Viable Product" or just simple a just a little programming project. What is the purpose of having a MVP is to create a basis of every programming projects.

Customer Profile info  in VB 6


Customer Information




Customer Profile information  in VB 6 Source Codes ( For Those Using Mobile Phone Please Check if your browser request for Desktop site "WEB" or WWW so you can view the entire codes, or Highlight all codes and copy in your mobile text editor). like what you see in the image below just simply click it.

Click "View web version"

Option Explicit
Dim Activity As String

Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdNew_Click()
Dim I As Integer
txtName.Text = ""
txtAge.Text = ""
For I = 0 To 5
    chkAct(I).Value = vbUnchecked
Next I
End Sub

Private Sub cmdShow_Click()
Dim NoAct As Integer, I As Integer
Dim Msg As String, Pronoun As String

If txtName.Text = "" Then
    MsgBox "The profile requires a name.", vbOKOnly + vbCritical, "No Name Entered"
Exit Sub
End If

If txtAge.Text = "" Then
    MsgBox "The profile requires an age.", vbOKOnly + vbCritical, "No Age Entered"
Exit Sub
End If

Msg = txtName.Text + " is" + Str$(txtAge.Text) + "years old." + vbCr
If OptSex(0).Value = True Then
Pronoun = "He "
Else
Pronoun = "She"
 End If
Msg = Msg + Pronoun + "lives in " + cboCity.Text + "." + vbCr
Msg = Msg + Pronoun + "is a"
If optLevel(3).Value = False Then Msg = Msg + "n " Else
Msg = Msg + " "
Msg = Msg + Activity + " level athlete." + vbCr
NoAct = 0
For I = 0 To 5
    If chkAct(I).Value = vbChecked Then NoAct = NoAct + 1
Next I
If NoAct > 0 Then
    Msg = Msg + "Activities include:" + vbCr
    For I = 0 To 5
        If chkAct(I).Value = vbChecked Then Msg = Msg + String$(10, 32) + chkAct(I).Caption + vbCr
        Next I
Else
 Msg = Msg + vbCr

End If
MsgBox Msg, vbOKOnly, "Customer Profile"

End Sub

Private Sub Form_Load()
cboCity.AddItem "Fairview"
cboCity.AddItem "Quezon City"
cboCity.AddItem "Caloocan"
cboCity.AddItem "Marikina"
cboCity.AddItem "Taguig"
cboCity.AddItem "Makati"
cboCity.AddItem "Malabon"
cboCity.AddItem "Navotas"
cboCity.AddItem "Valenzuela"
Activity = "intermediate"
End Sub

Private Sub optLevel_Click(Index As Integer)
Select Case Index
Case 0
    Activity = "extreme"
Case 1
    Activity = "advanced"
Case 2
    Activity = "intermediate"
Case 3
    Activity = "beginner"
End Select
End Sub

Private Sub txtAge_KeyPress(KeyAscii As Integer)
If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or KeyAscii = vbKeyBack Then
Exit Sub
Else
    KeyAscii = 0
End If
End Sub

First Project is customer profile that we usually seeing in most systems. Here I just made simple as the one that I used to submit in my school activities, well it is what I submitted back then. You must be curious about OptSex(0) and OptSex(1) well they are indexed same also to chkAct(0) to chkAct(5) they are all indexed. Why did I indexed them so whenever used it she or he will never make collision in values or repetition in inserting information or data.

How to make an indexed or control array like OptSex(#) and chkAct(#)?

Just copy the object you like to indexed or control arrayed first you have to select the object. As you will see on the image below you'll have to select it by clicking the object once, and do the copy and paste action commands like ctrl + c then ctrl + v to do the copy and paste operation. 
Selected object (Option Button)
Then after you do the copy and paste command operation their will be a notification message that will be shown to you. As you will see in the image below is a sample screen-shot of the said notification message that you'll get.
Sample notification message after Copy and Paste Operation
Choose "Yes" to make a indexed or control arrayed object in the form you currently working on.

Whats good in learning to develop Customer Information?


Pretty simple why? Because in many database systems it needed to include user information form where to insert data that an admin needed to confirm or determined the difference among all users. We can also call it as user profile form where users entering key information about him/herself. As a admin of a system where it was included we used it to determined the best course of action or best suitable service that we need to give to our users.

On what kind of system's we can see a Customer Information or Profile?

We can see it any user-base systems like statistical programs, dating sites, ad networks site, Social Media's, storage systems etc..., It was a very integral part of a very systems that it could not be run or produce service without it. Like on an online shopping sites as a customer or user, you must provide a complete information on where the ordered or purchased item should go to, or the transaction will be invalid.

If you found this Article useful feel free to Click the Button below.


Buy Me A Coffee

No comments:

Post a Comment