by Anitha (5 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 10th February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Try Status bar control & List view control
'The purpose of this control is to proveide the current status or guidance to the users
'Lying at the bottom of the screen, this control can be used to give messages like "Record deleted" or "Only DD/MM/YYYY format is accepted"
'Any number of panels can be added to a statusbar control and date(), time() and other functions can be given in each panel.
'The MDIform as well as all forms can have a statusbar control of its own !
Private Sub Form_Load()
StatusBar1.Panels(1).Text = "ABC Company Ltd." 'Company name can be specified
StatusBar1.Panels(3).Text = Date 'Current date can be specified in another columnm
Set rs = CreateObject("adodb.recordset")
Set cn = CreateObject("adodb.connection")
End Sub
Private Sub Combo1_GotFocus()
StatusBar1.Panels(2).AutoSize = sbrSpring 'Panel size adjust as per the comments
StatusBar1.Panels(2).Text = "Records updated..." 'Any status message can be given
End Sub
Private Sub Text1_GotFocus()
StatusBar1.Panels(4).Text = "Enter employee name" 'User guide
End Sub
'Listview control
'Right click on the Listview control to insert two columns.
'Select checkboxes & gridlines ,so that checkboxes & gridlines will be added to the control.
'The purpose of listview control is to list out all the items applicable and the user can put a check mark to the relevant items.
Private Sub ListView1_GotFocus()
ListView1.View = lvwReport
Set i = ListView1.ListItems.Add(1, , "Rice")
Set j = ListView1.ListItems.Add(2, , "Sugar")
Set k = ListView1.ListItems.Add(3, , "Oil")
i.SubItems(1) = "25.00 Rs" 'only when u have atleast two columns u can add subitems to your list !
j.SubItems(1) = "20.00 Rs"
k.SubItems(1) = "15.00 Rs"
End Sub
' Try and send ur comments to [email protected]