Labels

Showing posts with label VISUAL BASIC 6.0 VIDEO TUTORIAL-QUICK AND EASY. Show all posts
Showing posts with label VISUAL BASIC 6.0 VIDEO TUTORIAL-QUICK AND EASY. Show all posts

Friday, 12 November 2021

How to print content of a RichTextBox Control in Visual basic | Printing...

How to print content of a RichTextBox Control in Visual basic | Printing RichTextBox |Print to a pdf in this video, we will demonstrate how to print content of a RichTextBox Control in Visual basic 6. Printing RichTextBox Control content to a Pdf file . Step by step tutorial. In Visual basic 6, we can print content of a richtextbox control using printer and software to print data to a pdf file as well. This application will demonstrate 
Part:1 "How to Load data from a text file (RTF) to Richtextbox using Common Dialog Control and Richtextbox Control in Visual Basic" and How to Clear Rich Text Box Control. Link : https://youtu.be/32ITifBWJUI 
Part:2 How to Save Richtextbox data to a file using Common dialog control in Visual basic Link : https://youtu.be/oBJE3j2JJ1w
Part :3 How to Print Richtextbox content in visual basic and Print to a PDF file in visual basic . 
 Step by Step Tutorial No step is skipped  
 Code: 
Dim data As String
Dim filename As String


Private Sub clearbtn_Click()
RichTextBox1.Text = ""
End Sub

Private Sub loadbtn_Click()
opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|"
opendialog.ShowOpen
data = opendialog.filename
RichTextBox1.LoadFile (data)
End Sub

Private Sub printbtn_Click()
opendialog.CancelError = True
On Error GoTo CancelAlert
opendialog.Flags = cdlPDReturnDC + cdlPDNoPageNums
opendialog.ShowPrinter
RichTextBox1.SelPrint opendialog.hDC
Printer.EndDoc

CancelAlert:
Exit Sub

End Sub

Private Sub savebtn_Click()
opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|"
opendialog.ShowSave
filename = opendialog.filename
RichTextBox1.SaveFile filename, rtfText
End Sub

Monday, 8 November 2021

How to save richtextbox data to a text file in visual basic | Export dat...

How to save richtextbox data to a text file in visual basic | Export data to a text file or RTF file | How to save richtextbox content to a file in visual basic |Visual Basic 6 Step by Step Tutorial In the Part:1, we have demonstrated "How to Load data from a text file (RTF) to Richtextbox using Common Dialog Control and Richtextbox Control in Visual Basic" and How to Clear Rich Text Box Control. In Part:2, we have discussed about "How to save Richtextbox data to a Text File or RTF file". All steps are explained in detail,no step is skipped while making this video tutorial. Step by Step Tutorial Code Dim data As String Dim check As Integer Dim filename As String Private Sub Command1_Click() opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|" opendialog.ShowOpen data = opendialog.filename ''check = Len(data) If opendialog.filename = "" Then MsgBox "You click on Cancel!! Kindly Select the file you want to load", vbOKOnly + vbCritical Else RichTextBox1.LoadFile (data) End If End Sub Private Sub findbtn_Click() opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|" opendialog.ShowSave filename = opendialog.filename RichTextBox1.SaveFile filename, rtfText End Sub

Wednesday, 3 November 2021

How to Load data from a text file to RichTextBox control using Dialog Co...

How to Load data from Text (.txt) and RTF (.rtf) file to Richtextbox control using Common Dialog control in Visual Basic 6 .Also Clear the richtextbox control.Visual Basic Tutorial-Step by step Tutorial,No Step skipped. In the Part-1 of this Video, we will discuss following points 1.How to add Richtextbox and Common Dialog Control in the Visual Basic Project. 2.How to Use Richtextbox and Common Dialog Control and set their properties. 3.How to load data from a text file to Richtextbox using Open Dialog control and Command Button.In open Dialog, we will select any text file from the PC and Open that file content into the richtextbox control. 4.How to clear the richtextbox. All steps are explained in detail,no step is skipped . Next Part-2 ,we will discuss about Saving data from a richtextbox to a text .txt file and RTF .rtf file and store in PC.  
 Code: 
Dim data As String
 Private Sub loadbtn_Click() 
opendialog.Filter = "Text File(*.txt)|*.txt|RTF File(*.rtf)|*.rtf|" 
opendialog.ShowOpen
 data = opendialog.FileName RichTextBox1.LoadFile (data)
 End Sub

 Private Sub clearbtn_Click() 
RichTextBox1.Text = ""
 End Sub

Monday, 24 September 2018

How to install visual basic 6.0 on windows 7,8

How to install visual basic 6.0 on windows 7,8 &10 (32 bit & 64 bit operating system)-Step by step tutorial. in this video ,you can easily find the way to install visual basic 6.0 on windows operating system.

Tuesday, 21 March 2017

Visual Basic 6.0 Tutorial | Search Records between Two dates using DataG...

Visual Basic 6.0 Tutorial | Search Records between Two dates using DataGrid and DTPicker Control
Visual Basic 6.0 Tutorial:Search Records between Two dates using DataGrid and Datepicker Control | Extract Records between two dates in Visual Basic 6.0 |Show Data between two dates-Visual Basic Database Application
In this video,following features are discussed:
1.How to add datepicker(DTpicker) control into the form.
2.How to format DTPicker Control and change the look of the control.
3.How to  make the necessary changes in the properties of DTPicker control for effecient data searching.
4.How to Extract records between Two dates using DTPicker Control.
for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Sunday, 11 December 2016

Listview Control and Its Properties- Add,Delete Search and Sort Listview...

Listview and its properties-Add,Delete,Search and Sort Listitems in the Listview-Visual Basic 6-Quick and Easy
Working with Columnheaders (Add Column Headers,Add Images to Listview's CoumnHeaders ,Adjust ColumnHeader's Width,Align ColumnHeaders,Adding Images to columnHeaders)
Working with Listitems (Add Listitems,Add Images to Listitems of the Listview,Delete Listitems from Listview ,Seacrh Listitems in The Listview and Sort Listitems in Ascending or Descending Order)
STEP:1
 Add Listview Control and ImageList Control on to the form.
STEP-2
Set Properties of the Listview Control
and Add Images to the Imagelist Control.
(In ImageList,I am using index 1 Pic for ColumnHeader,Index 2 Pic for Male ,Index 3 Image for Female)
STEP:3
How to add Column Header to the List View.
A. Add Column Headers to the Listview
B. Align Columns Left,Right,Center
C. Adding Images to Column Headers using ImageList.
STEP:4
How to add Listitems to the Listview
A. Declare Listitem Object Variable.
B. Add Listitems to the Listview.
C. Add Images to the Listitem added to the Listview using ImageList.
STEP:5
How to Reorder Column Headers,Show/Hide ScrollBar, HoverSelection.
STEP:6
How to Select Full Row Listitem of the Listview.
STEP:6
For Delete and Search a particular Listitem from the Listview.
Add Command Buttons and Textbox Controls on to the form.
STEP:7
How to Delete Selected Listitem from ListView.
STEP:8
How to Search a Particular Listitem from Listview by highlighting that Item.
STEP:9
How to Sort Listitems in Ascending and Descending Order  in the Listview.
STEP:10
How to Change Background,Apply Font Size,Font Face,Font Style,Forecolor to Listview.




Code:
Delete Listems:
Private Sub Command1_Click()
ListView1.ListItems.Remove (ListView1.SelectedItem.Index)
End Sub

Find Listitem from the Listview:
Private Sub Command2_Click()
Dim itmx As ListItem
Set itmx = ListView1.FindItem(Text1.Text, lvwText, , lvwPartial)
If itmx Is Nothing Then
MsgBox "record not found", vbCritical
Else
ListView1.ListItems(itmx.Index).Selected = True
ListView1.SetFocus
End If
End Sub

Private Sub Form_Load()
Dim list As ListItem
Set ListView1.ColumnHeaderIcons = ImageList1
With ListView1.ColumnHeaders
.Add , , "RollNo", Width / 4, lvwColumnLeft, 1

.Add , , "Name", Width / 4, lvwColumnCenter, 1

.Add , , "Class", Width / 4, lvwColumnCenter, 1

.Add , , "Section", Width / 4, lvwColumnCenter, 1

End With
Set ListView1.SmallIcons = ImageList1
Set list = ListView1.ListItems.Add(, , "101", , 2)
list.SubItems(1) = "Sandeep Kaundal"
list.SubItems(2) = "MCA"
list.SubItems(3) = "A"
Set list = ListView1.ListItems.Add(, , "102", , 2)
list.SubItems(1) = "Ajay Kaundal"
list.SubItems(2) = "MBA"
list.SubItems(3) = "B"
Set list = ListView1.ListItems.Add(, , "103", , 3)
list.SubItems(1) = "Savita Kaundal"
list.SubItems(2) = "BCA"
list.SubItems(3) = "C"
Set list = ListView1.ListItems.Add(, , "104", , 2)
list.SubItems(1) = "Rajesh Kumar"
list.SubItems(2) = "MA"
list.SubItems(3) = "A"
Set list = ListView1.ListItems.Add(, , "105", , 2)
list.SubItems(1) = "Bhubnesh Kumar"
list.SubItems(2) = "MBA"
list.SubItems(3) = "C"
Set list = ListView1.ListItems.Add(, , "106", , 3)
list.SubItems(1) = "Kamlesh Kumari"
list.SubItems(2) = "BA"
list.SubItems(3) = "A"
ListView1.AllowColumnReorder = True
ListView1.FlatScrollBar = True
ListView1.HoverSelection = True
Set list = ListView1.ListItems.Add(, , "107", , 2)
list.SubItems(1) = "Dharmesh Kumar"
list.SubItems(2) = "MCA"
list.SubItems(3) = "B"

ListView1.TextBackground = lvwOpaque
ListView1.BackColor = vbYellow
ListView1.Font.Size = 15
ListView1.Font.Name = "Arial"
ListView1.ForeColor = vbBlue
ListView1.Font.Bold = True
End Sub

Sort Listitems in Ascending and Descending Order:
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
ListView1.Sorted = True
If ListView1.SortOrder = lvwAscending Then
ListView1.SortOrder = lvwDescending
Else
ListView1.SortOrder = lvwAscending
End If
End Sub

for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Saturday, 16 July 2016

How to Reset Forgot Password in Visual Basic 6 0/MS Access Login Applica...

How to Reset Forgot Password in Visual Basic 6 0/MS Access Login Application-Step by Step-Visual Basic 6.0 Database Tutorial.
In this tutorial, following features are discussed
First, I am using my earlier Login Application https://youtu.be/s-BU03egpWA 
*How to make database connectivity with access database for Reset Form.
* How to check the existing User of the application, Whether User credentials are available in the database or not. It gives message according to the availability user.
*How to verify or authenticate the user by entering the date of birth which is registered while registration of the account using Login System.
*Once Date of birth is verified with the database.it generates message accordingly showing Full name of the user and Reset Password option is available where you can enter your new password.
* if Date of Birth is not verified ,then You cannot see the Reset Password option on the form and not able to change the password anymore.
*When you see the password reset option, Here you have to provide New Password and retype to confirm the same password.
if New and confirm password matches with each other ,then you will be able to change the password by clicking Change Password button otherwise it gives warning msg:Password not matched.
*Once you successfully change the password, now you can Login into the system with your New Password.

For more information and Demo, Please watch the video and Note down each step.You can also make the same application without any error.
for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/



Source Code :-
______________________________________

LOGIN FORM
_____________________________________

Private Sub cancelbtn_Click()
End
End Sub


Private Sub loginbtn_Click()
loginado.RecordSource = "select * from Logintb where Username='" + txtuser.Text + "' and Password='" + txtpass.Text + "'"
loginado.Refresh
If loginado.Recordset.EOF Then
MsgBox "Login failed,Try Again..!!!", vbCritical, "Please Enter correct Username and Password"
Else
MsgBox "Login Successful.", vbInformation, "Successful Attempt"
welcome.Show

End If
End Sub

Private Sub resetbtn_Click()
reset.Show
End Sub
_______________________________________

REGISTRATION FORM
_______________________________________

Private Sub Command1_Click()
registerado.Recordset.Fields("RollNo") = txtroll.Text
registerado.Recordset.Fields("Name") = txtname.Text
registerado.Recordset.Fields("Username") = txtuser.Text
registerado.Recordset.Fields("Password") = txtpass.Text
registerado.Recordset.Fields("DOB") = txtdob.Text
registerado.Recordset.Update
txtroll.Text = ""
txtname.Text = ""
txtuser.Text = ""
txtpass.Text = ""
txtdob.Text = ""
MsgBox "Registration Successful,Please Login with your Username and Password"
Login.Show

End Sub

Private Sub Form_Load()
registerado.Recordset.AddNew
End Sub
________________________________________

RESET FORM
________________________________________

Change Password code:-

Private Sub changepassbtn_Click()
If txtnew.Text = txtconfirm.Text Then
forgetado.Recordset.Fields("Password") = txtconfirm.Text
forgetado.Recordset.Update
MsgBox "Password Changed Successfully", vbInformation, "Password Change: Success"
reset.Hide
Login.Show
Else
MsgBox "Password Does not matched,Please Enter Correct Details", vbExclamation, "Change Password:Failed"
txtnew.Text = ""
txtconfirm.Text = ""
End If
End Sub

Check User code:-

Private Sub checkbtn_Click()
forgetado.RecordSource = "Select * from Logintb where username='" + txtuserid.Text + "'"
forgetado.Refresh
If forgetado.Recordset.EOF Then
lblmsg.Caption = "User ID Not Found ..Sorry Can't ReSet the password!!!! "
lblmsg.ForeColor = &HFF&
Else
lblmsg.Caption = "User ID Found in the database"
lblmsg.ForeColor = &H8000&
End If
End Sub

Form Load:-

Private Sub Form_Load()
txtnew.Visible = False
txtconfirm.Visible = False
changepassbtn.Visible = False
Label3.Visible = False
Label4.Visible = False
End Sub

Verification Code:-

Private Sub verifybtn_Click()
Dim str As String
str = StrComp(forgetado.Recordset.Fields("DOB").Value, txtdate.Text, vbTextCompare)
If str = True Then
lblmsg1.Caption = "Account not verified ,Can't reset the password"
lblmsg.Caption = "Sorry .. Date of Birth Not Matched !! "
lblmsg.ForeColor = &HFF&
lblmsg1.ForeColor = &HFF&
Else
lblmsg.ForeColor = &H8000&
lblmsg1.ForeColor = &H8000&
lblmsg.Caption = "Congratulations !!"
lblname.Caption = forgetado.Recordset.Fields("Name")
lblname.ForeColor = &HFF&
lblmsg1.Caption = "Account is verified Now,Set your new Password"
txtnew.Visible = True
txtconfirm.Visible = True
changepassbtn.Visible = True
Label3.Visible = True
Label4.Visible = True
End If
End Sub
__________________________________________

Option for Login or Registration
__________________________________________
Private Sub Command1_Click()
Registration.Show

End Sub

Private Sub Command2_Click()
Login.Show
End Sub
_________________________________________________________________________________
Please Share and Subscribe to my youtube channel.
Don't fogot to hit LIKE button if you like my work.

Sandeep Kaundal

Tuesday, 5 July 2016

How to Connect Datagrid control with Access database without using adodc

Visual Basic 6 :How to connect  DataGrid control with Access database without using ADODC (ADO data control) and display data in the datagrid control-Visual Basic 6.0 Tutorial -Step by Step



Code:
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Database Folder\Student Database.mdb;Persist Security Info=False"
rs.CursorLocation = adUseClient
rs.Open "Select * from Student_Info", con, adOpenKeyset, adLockPessimistic, adcmdtxt
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
Set rs = Nothing
End Sub

If you like my work ,Please hit LIKE button and Subscribe to my channel

Wednesday, 15 June 2016

How to Make installer (Setup exe) for Visual Basic database Project-St...

How to make installer (Setup.exe) for VB6 Database project and create your own software package for installation or distribution.
Create Visual Basic Installer in easy step using Package and Deployment wizard.
In this video,I have created installer or Installation Package (Setup exe files) for your visual basic database project with simple and easy step.Also i have demonstrated about  installation of Application as well.  

Please SHARE and SUBSCRIBE TO MY CHANNEL.

Wednesday, 27 April 2016

Visual Basic 6.0 Tutorial: ImageCombo and ImageList-Display Image with C...

Learn Visual Basic 6.0 Tutorial-Working with ImageCombo and Image List-Display Image with Combo items in the Combobox-Step by Step
STEP-I
Add Microsoft Windows Common Control 6.0 .
Add ImageCombo onto the form from Toolbox.
Use ImageCombo Add Method
Syntax:
Imagecombo1.ComboItems.Add(INDEX,KEY,TEXT,IMAGE,SELECTEDIMAGE,IDENTATION)
I am using Only Two Parameter of add method i.e TEXT and IMAGE for displaying the Image in the combobox.
STEP:2
To display Image Left to Comboitems in the Combobox
 *Add Imagelist Control onto form.
* Add Images into the Imagelist.
* Assign the Index value of Pictures in the Imagelist to the IMAGE parameter of the Add Method of the ImageCombo Control.

its done!!!!.

Code:
Private Sub Form_Load()
Set ImageCombo1.ImageList = ImageList1
ImageCombo1.ComboItems.Add , , "Administrator", 1
ImageCombo1.ComboItems.Add , , "Staff", 2
ImageCombo1.ComboItems.Add , , "Office Assistant", 3
ImageCombo1.ComboItems.Add , , "Librarian", 4
ImageCombo1.ComboItems.Add , , "Store Keeper", 5
End Sub

Private Sub ImageCombo1_Click()
Text1.Text = ImageCombo1.Text
End Sub

Here is my updated List of Tutorials.
Create,Save,Update,Delete and Search Student Profile  https://youtu.be/bL03PrGt8WY
Advance Login System (Splash Screen with Progress Bar,User Registration,Login system,WElcome )   https://youtu.be/s-BU03egpWA
Add Delete Update Search https://youtu.be/K8jq2H3aamk
Data Report in VB6   https://youtu.be/vjQDtKMUCKk
Data Manager in VB6  https://youtu.be/27IrMsEXlBc
Create Tool Bar,Status Bar and Menu Bar   https://youtu.be/3l6bciTAC7Q
Common dialog control- Font and Color Dialog   https://youtu.be/4DBy2ghmu7U
Search Records in Database (By Name or ID)  https://youtu.be/1yNScTVAqZ4
Login Form using Visual Basic 6.0  https://youtu.be/XXKjfta5kkg
Add Delete Update and Clear records  https://youtu.be/tYS7uncH8Ds
Simple Visual Basic Database  Application  https://youtu.be/PldGe0-FnI8
Design Font Dialog Box in VB 6  https://youtu.be/C0CMtoXIFY4
Road Traffic lights Animated system https://youtu.be/74Zvl0bXeAY
ListBox Control( Advanced)  https://youtu.be/Q6NYtmH7z9Q
ListBox Control -Add,Delete and Clear items https://youtu.be/YlmKSyk0l2k
Custom Progress Bar with percentage completed on Splash Screen  https://youtu.be/jGSxrhYZAbE
Frame Control,Check Box and Option Buttons https://youtu.be/9x9dmM0V4CU
Picture Viewer+Browser in Visual Basic  https://youtu.be/POd1Kmpvc0M
Splash Screen with Progress Bar-  https://youtu.be/95hw5z7lq4A
 Create Menus,Drop Down Menus ,Nested menus in Menu Barhttps://youtu.be/fNtJaQgnuEs

for more about  Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Please Share | Support | SUBSCRIBE



Don't forget to hit LIKE button,if you like my work.


Monday, 4 April 2016

Create,Save,Update,Delete and Search Student Profile Using Visual Basic ...

How to create ,Save,Update ,Delete and Search Student Profile information using Visual basic and Ms Access-Step By Step
VB6 Control used are Textbox,  OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls
Features of Application are:
1.How to design the VB form and add various controls i.e Textbox,  OptionBox,Combobox,Picturebox,DatePicker ,Common Dialog controls onto the form.
2.How to create database object at run time and do the database connectivity.
3.How to load the image onto the form using commondialog control and also  Save /Retrieve  the Image or Picture from the database.
4.How to save the values selected from Optionbox and Combobox into the database and retrieve them when required.
5.How to Use datepicker control and Save the Date into the Database.
6.How to Save ,Delete,Update and Search the Student profiles.
7.How to navigate between the profiles (First/Next/Previous/Last).

if you like my work,Please hit like button and SUBSCRIBE to my channel.

CODE FOR THIS APPLICATION:

Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Dim confirm As Integer

CODE FOR ADD NEW PROFILE
Private Sub addnew_Click()
rs.addnew
clear
End Sub
Sub clear()
Text1.Text = ""
Text2.Text = ""
DTPicker1.Value = "10/05/2005"
Option1.Value = False
Option2.Value = False
Combo1.Text = "Select Department"
Combo2.Text = "Select Course"
Combo3.Text = "Select Semester"
Text3.Text = ""
Text4.Text = ""
Picture1.Picture = LoadPicture("")
End Sub
CODE FOR COMBOBOX SELECT OPTIONS
Private Sub Combo1_Click()
Combo2.clear
If Combo1.Text = "Computer Science" Then
Combo2.AddItem "M.C.A"
Combo2.AddItem "B.C.A"
Combo2.AddItem "B.Sc(IT)"
ElseIf Combo1.Text = "Electrical Engineering" Then
Combo2.AddItem "B.TECH (EE)"
Combo2.AddItem "M.TECH (EE)"
ElseIf Combo1.Text = "Civil Engineering" Then
Combo2.AddItem "B.TECH (CE)"
Combo2.AddItem "M.TECH (CE)"
Else
End If
End Sub
CODE FOR DELETE BUTTON
Private Sub deletebtn_Click()
confirm = MsgBox("Do you want to delete the Student Profile", vbYesNo + vbCritical, "Deletion Confirmation")
If confirm = vbYes Then
rs.Delete adAffectCurrent
MsgBox "Record has been Deleted successfully", vbInformation, "Message"
rs.Update
refreshdata
Else
MsgBox "Profile Not Deleted ..!!", vbInformation, "Message"
End If

End Sub
Sub refreshdata()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenStatic, adLockPessimistic
If Not rs.EOF Then
rs.MoveNext
display
Else
MsgBox "No Record Found"
End If
End Sub
CODE FOR SEARCH PROFILE:
Private Sub findbtn_Click()
rs.Close
rs.Open "Select * from ProfileTBL where RollNo='" + Text1.Text + "'", con, adOpenDynamic, adLockPessimistic
If Not rs.EOF Then
display
reload
Else
MsgBox "Record Profile not found ..!!", vbInformation
End If

End Sub
Sub reload()
rs.Close
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic
End Sub
Database Connectivity under FORM LOAD
Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Database Folder\ProfileDB.mdb;Persist Security Info=False"
rs.Open "Select * from ProfileTBL", con, adOpenDynamic, adLockPessimistic

Combo1.AddItem "Computer Science"
Combo1.AddItem "Electrical Engineering"
Combo1.AddItem "Civil Engineering"
Combo3.AddItem "SEMESTER-I"
Combo3.AddItem "SEMESTER-II"
Combo3.AddItem "SEMESTER-III"
Combo3.AddItem "SEMESTER-IV"
Combo3.AddItem "SEMESTER-V"
Combo3.AddItem "SEMESTER-VI"
Combo3.AddItem "SEMESTER-VII"
Combo3.AddItem "SEMESTER-VIII"
display
End Sub
Sub display()
Text1.Text = rs!Rollno
Text2.Text = rs!Name
DTPicker1.Value = rs!DOB
If rs!Gender = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
Combo1.Text = rs!Dept
Combo2.Text = rs!Course
Combo3.Text = rs!Semester
Text3.Text = rs!Address
Text4.Text = rs!phone
Picture1.Picture = LoadPicture(rs!photo)
End Sub
CODE FOR RECORD NAVIGATION
Private Sub Firstbtn_Click()
rs.MoveFirst
display
End Sub

Private Sub lastbtn_Click()
rs.MoveLast
display
End Sub

Private Sub nextbtn_Click()
rs.MoveNext
If Not rs.EOF Then
display
Else
rs.MoveFirst
display
End If
End Sub

Private Sub Previousbtn_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveLast
display
Else
display
End If
End Sub
CODE FOR SAVE PROFILE
Private Sub savebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
rs.Fields("Photo").Value = str
MsgBox "Data is saved successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR UPDATE PROFILE
Private Sub updatebtn_Click()
rs.Fields("RollNo").Value = Text1.Text
rs.Fields("Name").Value = Text2.Text
rs.Fields("DOB").Value = DTPicker1.Value
If Option1.Value = True Then
rs.Fields("Gender") = Option1.Caption
Else
rs.Fields("Gender") = Option2.Caption
End If
rs.Fields("Dept").Value = Combo1.Text
rs.Fields("Course").Value = Combo2.Text
rs.Fields("Semester").Value = Combo3.Text
rs.Fields("Address").Value = Text3.Text
rs.Fields("Phone").Value = Text4.Text
MsgBox "Data is updated successfully ..!!!", vbInformation
rs.Update
End Sub
CODE FOR LOADING PICTURE
Private Sub uploadbtn_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Jpeg|*.jpg"
str = CommonDialog1.FileName
Picture1.Picture = LoadPicture(str)
End Sub

Here is my updated List of Tutorials.
Advance Login System (Splash Screen with Progress Bar,User Registration,Login system,Welcome )   https://youtu.be/s-BU03egpWA
Add Delete Update Search https://youtu.be/K8jq2H3aamk
Data Report in VB6   https://youtu.be/vjQDtKMUCKk
Data Manager in VB6  https://youtu.be/27IrMsEXlBc
Create Tool Bar,Status Bar and Menu Bar   https://youtu.be/3l6bciTAC7Q
Common dialog control- Font and Color Dialog   https://youtu.be/4DBy2ghmu7U
Search Records in Database (By Name or ID)  https://youtu.be/1yNScTVAqZ4
Login Form using Visual Basic 6.0  https://youtu.be/XXKjfta5kkg
Add Delete Update and Clear records  https://youtu.be/tYS7uncH8Ds
Simple Visual Basic Database  Application  https://youtu.be/PldGe0-FnI8
Design Font Dialog Box in VB 6  https://youtu.be/C0CMtoXIFY4
Road Traffic lights Animated system https://youtu.be/74Zvl0bXeAY
ListBox Control( Advanced)  https://youtu.be/Q6NYtmH7z9Q
ListBox Control -Add,Delete and Clear items https://youtu.be/YlmKSyk0l2k
Custom Progress Bar with percentage completed on Splash Screen  https://youtu.be/jGSxrhYZAbE
Frame Control,Check Box and Option Buttons https://youtu.be/9x9dmM0V4CU
Picture Viewer+Browser in Visual Basic  https://youtu.be/POd1Kmpvc0M
Splash Screen with Progress Bar-  https://youtu.be/95hw5z7lq4A
Create Menus,Drop Down Menus ,Nested menus in Menu Bar https://youtu.be/fNtJaQgnuEs

for more about  Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Please Share | Support | SUBSCRIBE

Wednesday, 2 March 2016

Data Report using Data Environment (Print and Export)-Visual Basic6

Visual Basic 6.0 Tutorial -Create Data Report using Data Environment (Print and Export data report)-Step by Step-From Scratch
In this Video tutorial,Following Features are discussed
1.First,Create Database ,Store Data in it using MS Access.Also,Display the data in Datagrid Using ADODC and Data Grid Control In Visual Basic 6.0 .
2.Before Creating data report in Vb6,First Create Data Environment Which is used to connect your database with Data Report and tells the data report what is stored in the database..
3.Once,Data Environment  has been created ,Now Create Data Report with Data Environment just by dragging different fields from Data Environment to Data Report..
4.How to display all records in one Page or One Record in One Page.
5.How to print the data report.
6.How to export contents of data report to text files or other format files.
7.Use various Controls and functions in the different Sections of  Data Report in order to make data report more readable and understandable.With functions,You can do the calculations about the records and values.
8.How to make this data report attractive and more effective,with Logos,Text and tabular representation of data using controls.

You can also create the same data report ,just watch this video.

if you like this tutorial,Please Hit Like button and Share -SUBSCRIBE.
for any query,leave a comment in comment section.
Thanks .

for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Monday, 22 February 2016

Visual Basic6.0-Working with Visual Data Manager-Create Database,Add Index to table...

Learn VB 6-Working with Visual Data Manager-Create Database,Add Index to table, perform operations on Database (Add,Delete ,Update,Refresh,Close) without coding.
Using Visual Data Manager,.Create Database and table,Add Index to table,Create form using Data Form Designer and performs Add,Delete,Refresh,Update ,Close operations without any coding.
In this tutorial,following features are demonstrated.
1.How to use visual Data manager,Create database and then create a new Table along with fields.
2.Create a form using data form designer and connect it with database's table.
3.Perform Add,Delete,Update,Refresh ,Close Operations on the database without any coding.

for more Visual Basic tutorials,please visit 
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/



If you have any query or issue with VB6 ,let me know.
Just leave a comment in the comment section.
Thanks for watching.Don't forget to hit like button,if you like my work .

Thursday, 28 January 2016

Create Tool Bar,Status Bar and Menu Bar Using Visual Basic 6.0-Step By Step-Complete Tutorial

Create Tool Bar,Status Bar and Menu Bar Using Visual Basic 6.0-Step By Step.
In this tutorial,following features are demonstrated :
1. How to Create a Status Bar at the bottom of form ,Display Date And time,Status of CAPS LOCK/INSERT/NUM LOCK Enabled or Disabled.
2. How to use Image List control ,store images into the control and Use them in toolbar later on.
3. How to Create a Toolbar and place images in the menus using imagelist control,to make your toolbar more interactive.
 4.How to create Menu Bar,as discussed in my earlier tutorials.
 Link for more information.
 If you have any query,please leave comment.
if you found my tutorial more informative and useful then Hit like button and share it with your friends.
 for more Visual Basic tutorials,please visit
 Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/
 

 Thanks !!!!

Thursday, 10 December 2015

Common dialog control- Font and Color Dialog in Visual Basic 6.0

Visual Basic 6.0 Tutorial:Working with Common Dialog Control and its different Dialogs i.e Open,Save,Color,Font,Print and Help.
Video tutorial is focused on following points:
1.How to add Common Dialog Control 6.0 into VB form.
2.How to use different dialogs (Open,Save,Color,Font,Print and Help) with this control.
3.How to use different methods /Actions to invoke a particular dialog.
4.How to work with Font Dialog  and its different flags in detail.
(How to add specific fonts and Style,effects .colors ,Help to font dialog and how  to make them functional with code.)
5.How to work with Color Dialog and its different flags in detail.
(How to add different color options (Custom colors,Full Colors,Disable custom color)onto the color dialog and use them with text and background etc)



Source Code:
For Color Dialog Button
Private Sub colorbtn_Click()
On Error GoTo errorfix
dialogtest.Flags = &H1
dialogtest.ShowColor
Form1.BackColor = dialogtest.Color
errorfix:
End Sub
For Font Dialog button
Private Sub fontbtn_Click()
On Error GoTo errorfix
dialogtest.Flags = &H3 Or &H100 Or &H4
dialogtest.ShowFont
txtsample.FontName = dialogtest.FontName
txtsample.FontBold = dialogtest.FontBold
txtsample.FontItalic = dialogtest.FontItalic
txtsample.FontSize = dialogtest.FontSize
txtsample.FontStrikethru = dialogtest.FontStrikethru
txtsample.FontUnderline = dialogtest.FontUnderline
txtsample.ForeColor = dialogtest.Color
errorfix:
End Sub


for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

Tuesday, 8 December 2015

Search Records in Database (By Name or ID)-Visual Basic6.0 -Ms Access

How to search records in the database by entering either Name or Roll No/ID -Visual Basic 6.0 and MS Access Database Application.
 In my earlier tutorial,I demonstrate-How to Add,Delete,Update and Clear Records.,https://youtu.be/tYS7uncH8Ds
Now ,I am going to Add one more feature to this Application.
So In this tutorial,I demonstrate-How can you search a particular record in the database by entering either Roll No/ID or Name in the Textbox on the form.
 Following features covered:
1.How to make necessary changes in database connection (ADODC) for searching records in the database.
2.How to search records by Roll No/ID in the Database.
3.If Record is not available in the database,Then A warning Message box (Record Not Found-search for any other Roll No/ID) Appears.
4.How to search existing records by Name in the database



Source Code:
Double click on Go Button and Write the following code.
Private Sub gobtn_Click()
Studentdb.RecordSource = "select * from Student_Info where RollNo ='" + rollsearch.Text + "'or Name ='" + rollsearch.Text + "'"
Studentdb.Refresh
If Studentdb.Recordset.EOF Then
MsgBox "Record Not Found ,Please Try any other Rollno", vbInformation
Else
Studentdb.Caption = Studentdb.RecordSource
End If
End Sub


  If you have any queries,suggestions or problems,please leave comments.
 for more Visual Basic tutorials,Visit Youtube Channel:https://www.youtube.com/user/sandydehrian Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/ Do share and Subscribe to my channel :-)

Wednesday, 18 November 2015

Add,Delete ,Update,Search using VB6 DataGrid- ADODC and Access-Step by Step

Visual Basic Database Application:Add,Delete ,Update,Search Records Using Data Grid -Adodc Control and MS Access 2003-Step by Step
How to add ,delete,Update and Search records in DataGrid control placed on VB form.
How to change the properties to format the Data Grid control.
in this Application,I am using my previous App database (Student Database.mdb).
1.firstly ,Data Grid control and Adodc are not available on toolbox.So add these controls to form for use.
Next make the database connectivity using Adodc.DataGrid Control works only with ADODC control.So you have to use these two control on the form.One Adodc is used for database connectivity and Datagrid is used for display the records in the form of rows and columns.set the datasource property of Data Grid  to name of adodc for displaying the information in the form.
2.Once data is shown on the form,then set the datagrid property for adding ,deleting  and updating the records.
3.Add search capability to the datagrid.You can search the records by entering Name or RollNo in the textbox.if record is not available,it shows message"No Record Found".
4.How to filter the information about the students .
Everything is explained and performed in this application.


If you like my video,Please Hit like button and Subscribe to my channel for latest updates on tutorials.




Source Code:
Delete Record Command Button
Dim confirm As Integer

Private Sub delbtn_Click()
confirm = MsgBox("Do you want to delete the Record", vbYesNo + vbExclamation, "Warning Message")
If confirm = vbYes Then
adogrid.Recordset.Delete
MsgBox "Record Deleted Successfully", vbInformation, "Delete Record Confirmation"
Else
MsgBox "Record Not Deleted", vbInformation, "Record Not Deleted"
End If
End Sub
General Category Command Button
Private Sub GEN_Click()
adogrid.RecordSource = "Select * from Student_Info where Category='GEN'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
Search By Roll No or Name :GO command Button

Private Sub gosearch_Click()
adogrid.RecordSource = "Select * from Student_Info where RollNo='" + Text1.Text + "' or Name='" + Text1.Text + "'"
adogrid.Refresh
If adogrid.Recordset.EOF Then
MsgBox "Record Not Found,Enter any other Roll No or Name", vbCritical, "Message"
Else
adogrid.Caption = adogrid.RecordSource
End If
End Sub
OBC Category Command Button
Private Sub obc_Click()
adogrid.RecordSource = "Select * from Student_Info where Category='OBC'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
Plus One Class Command Button
Private Sub plusone_Click()
adogrid.RecordSource = "Select * from Student_Info where Class='Plus One'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
Plus Two Class Command Button
Private Sub plustwo_Click()
adogrid.RecordSource = "Select * from Student_Info where Class='Plus Two'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
SC Category Command Button
Private Sub sc_Click()
adogrid.RecordSource = "Select * from Student_Info where Category='SC'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
ST Category Command Button
Private Sub st_Click()
adogrid.RecordSource = "Select * from Student_Info where Category='ST'"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub
View All Records Command Button
Private Sub viewall_Click()
adogrid.RecordSource = "Select * from Student_Info"
adogrid.Refresh
adogrid.Caption = adogrid.RecordSource
End Sub

Please leave  comments and suggestions.
If you like my video,Please Hit like button and Subscribe to my channel for latest updates on tutorials.



Sunday, 8 November 2015

Advanced Login System using Visual Basic 6.0 and MS Access-Quick and easy

Create An Advanced Login System in Visual Basic 6.0 and Ms Access.

Features of this application are

Splash screen with progress bar,Welcome form asking for login or register,Registration form for new users to get register,Multi-User Login form for existing users as well new users registered.As you login successfully,you will be able to use the system.

In this video tutorial,you will able to create a splash screen having a progress bar indicating % complted status,as loading completes,A new form i.2 Welcome form will appeared on screen asking for Login or Register as a User.You can either register as new user or login into the system.For registration,A form Registration is available to create new username and password.Simultaneously,after the registration,you will be able to login with your current username and password.
In the tutorial,There are five VB forms:
1.Splash Screen having Progress Bar.
2.Welcome Form asking for Login (Existing User )or Register (New User).
3.Registration form for creating new users to use the sytem.
4.Multi-User Login form where all the users registered with the system ,can login into the system and Use the system.
5.Application form,As you login with your correct credentials,then you will be able to use the system.
Database connectivity or other programming stuff are explained step by step with written caption.
After watching this video,you wll be create the same login application for your own use.
for more information ,click on the Link:
Please leave a comment for any query.if you like my video,hit like button.
for more informative videos on technologies ,please subscribe to my channel.




Source Code: Splash Screen
_________________________________
Private Sub Form_Load()

Timer1.Enabled = True
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 5
lblstatus.Caption = "Loading..Plz Wait.."
lblstat.Caption = ProgressBar1.Value & "%"
If ProgressBar1.Value = ProgressBar1.Max Then
Timer1.Enabled = False
Unload Me
welcome.Show
End If
End Sub

Welcome
__________________________________________
Private Sub Form_Load()

Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub logbtn_Click()
login.Show
welcome.Hide
register.Hide
End Sub
Private Sub regbtn_Click()
register.Show
login.Hide
welcome.Hide
End Sub
Registration form
________________________________________________

Thursday, 22 October 2015

Login Form using Visual Basic 6.0 Adodc and Ms Access Database- Step by ...

Create a simple login form in visual basic 6.0 using ADODC control and Microsoft Access 2003 database-Step by Step demonstration.

After watching this video,you will be able to create a login form where multiple users can logged in and use the system.

In this Video tutorial,following points are discussed:

1.How to create a database and store the login credentials of different Users using access for VB login app.



2.How to Create a login form and do database connectivity with access .


3.How to do the authentication of users using some SQL commands and a piece of VB code.



Tutorial is only for Beginners,No validations rules are applied or followed while developing this login form.

No step is skipped while demonstration.All steps are explained with written text.



Source Code:



LOGIN BUTTON
Private Sub loginbtn_Click()

loginado.RecordSource = "select * from Logintab where Username='" + txtuser.Text + "' and Password='" + txtpass.Text + "'"

loginado.Refresh

If loginado.Recordset.EOF Then

MsgBox "Login failed,Try Again..!!!", vbCritical, "Please Enter correct Username and Password"

Else

MsgBox "Login Successful.", vbInformation, "Successful Attempt"

welcome.Show

End If

End Sub

CANCEL BUTTON

Private Sub cancelbtn_Click()

End

End Sub




Please Leave a comment and Subscribe to my channel :-)

Monday, 28 September 2015

How to Add,Update,Delete and Clear records in Database (Ms Access) with ...

How to add,Update ,Delete and Clear records in Ms Access Database using ADODC control -An Advanced Visual Basic Application (Step by step full tutorial with explanation of each step).

This tutorial is focused on following points.

* How to create a simple database with MS Access.

*How to add ADODC Control on the Visual Basic Toolbox.

*How to use the ADODC control and set the properties and establish database connection using Ms Access .

*How to set the properties of each fields according to database application.

*How to hide ADODC control.

*How to add Record navigation buttons i.e First,Previous,Next,Last.

*How to perform Database Operation i.e ADD Record,Delete Record,Update Record and Clear the records.



In this tutorial,every step is explained with supportive text within the video.so everyone can follow the steps to build such applications quite easily.

if you have any queries,suggestions or problems,please leave a comments.

Do share and Subscribe to my channel :-)









Source Code:


ADD RECORD:

Private Sub Addbtn_Click()

Studentdb.Recordset.AddNew

End Sub

CLEAR RECORD:

Private Sub cancelbtn_Click()

txtroll.Text = ""

txtname.Text = ""

txtclass.Text = ""

txtadd.Text = ""

txtemail.Text = ""

txtphone.Text = ""

End Sub

DELETE RECORD

Private Sub delbtn_Click()

confirmation = MsgBox("Do you want to delete this record", vbYesNo + vbCritical, "Delete Record Confirmation")

If confirmation = vbYes Then

Studentdb.Recordset.Delete

MsgBox "Record has been deleted Successfully", vbInformation, "Message"

Else

MsgBox "Record Not Delete !!!", vbInformation, "Message"

End If

End Sub

UPDATE RECORD:

Private Sub updatebtn_Click()

Studentdb.Recordset.Fields("RollNo") = txtroll.Text

Studentdb.Recordset.Fields("Name") = txtname.Text

Studentdb.Recordset.Fields("Class") = txtclass.Text

Studentdb.Recordset.Fields("Address") = txtadd.Text

Studentdb.Recordset.Fields("email") = txtemail.Text

Studentdb.Recordset.Fields("Phone") = txtphone.Text

Studentdb.Recordset.Update

MsgBox "data is saved successfully", vbInformation, "Message"

End Sub

EXIT APPLICATION

Private Sub exitbtn_Click()

Me.Hide

End Sub

FIRST NAVIGATION BUTTON

Private Sub firstbtm_Click()

Studentdb.Recordset.MoveFirst

End Sub

LAST NAVIGATION BUTTON

Private Sub lastbtn_Click()

Studentdb.Recordset.MoveLast

End Sub

NEXT NAVIGATION BUTTON

Private Sub nxtbtn_Click()

Studentdb.Recordset.MoveNext

End Sub

PREVIOUS NAVIGATION BUTTON

Private Sub prevbtn_Click()

Studentdb.Recordset.MovePrevious

End Sub