answersLogoWhite

0

How you use listview in vb6?

Updated: 9/19/2023
User Avatar

Wiki User

12y ago

Best Answer

just right ckick on tools bar present on left side

u will have a popup select component and again a box will appear now select option

"""" microsft window common control vb.6""""""""'

u will got listview in the tools

nd now drag it on form............

select view as=== ivwreport from properties window..............

and code it as................

Private Sub Form_Load()

Set cn = New ADODB.Connection

'cn.Open "provider=MSDAORA.1; user id = scott; password=tiger;data source=aim;"

cn.Open "provider=MSDAORA.1; user id = scott; password=tiger;"

Set rec = New ADODB.Recordset

rec.ActiveConnection = cn

rec.LockType = adLockOptimistic

rec.CursorLocation = adUseClient

rec.Source = "name of form"

rec.Open

rec.MoveFirst

While rec.EOF = False

cou = cou + 1

rec.MoveNext

Wend

rec.MoveFirst

ReDim ListItem(cou)

i = 1

While rec.EOF = False

Set ListItem(i) = ListView1.ListItems.Add()

ListItem(i).Text = rec.Fields(0)

ListView1.ListItems(i).ListSubItems.Add , , Trim(rec.Fields(1))

ListView1.ListItems(i).ListSubItems.Add , , Trim(rec.Fields(2))

rec.MoveNext

i = i + 1

Wend

Adodc1.Visible = False

End Sub

Private Sub listview1_DblClick()

rec.MoveFirst

i = 1

While rec.EOF = False

If rec.Fields(0) <> ListView1.ListItems(i) Then

rec.MoveNext

Else

Text1.Text = rec.Fields(0)

Text2.Text = rec.Fields(1)

DTPicker1.Value = rec.Fields(2)

rec.MoveNext

End If

i = i + 1

Wend

End Sub

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you use listview in vb6?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you make a cp trainer with free member?

use vb6


What is difference between vb5 vb6?

VB6 is a more recent and more advanced version of visual basic.


How do you convert vb6 to dmg?

A .vb6 file is visual basic 6 source code, sometimes with it are .frm files that you would need. A .dmg is a Macintosh binary. you would have to find a program to compile the vb6 code to a Macintosh binary.


How can you execute a new line in VB6?

vbNewLine


Differences butween the vb6 asnd vbnet?

Please refer the following link, there you can find useful information about differences between VB6 and VB .NET


'Download Visual Studio 6 Or Visual Basic 6 In Free?

Studio consists of C#, VisualJ, etc. Visual Basic is the predefined function of the VB6 environment. if you want to code in VB strictly, download VB6, but if you want to use C#, etc. than use VS6. But by now, I recommend upgrading to VS2008


How do you migrate Vb6 application to VB.Net?

In Visual Studio, use the migration wizard. It should be 90% successful. The rest will need manual refactoring.


Are Club Penguin trainers safe?

Hi There,Club Penguin Trainers Are Safe! Aslong as you dont use the ones which have not been made in VB6.


Free vb6 source code download for submission?

thanks


How can you make a vb6 project a web based project or how will you able to embed vb6 project or vb.net project into asp.net website?

you simply cant, unless you know how to upload exe's to the internet.


Advantages visual basic 2003to visual basic 6.0?

This may suprise you but visual basic 2003 was realeased a few years after vb6 vb6 I think was in 1998 and 2003 obviously in 2003


How do you convert VB6 to Flash?

I used to use imelfin video converter to convert my video, it works well and you can try it too.You can search it in Google search engine.