Solved

how can i show contact list like yahoo messenger or msn messenger in vb6

Posted on 2009-07-11
12
362 Views
Last Modified: 2012-05-07
how can i show contact list like yahoo messenger or msn messenger in vb6 need some ideas or examples in vb6
0
Comment
Question by:BILAL69
  • 7
  • 4
12 Comments
 
LVL 13

Expert Comment

by:game-master
ID: 24833166

good morning!

from where the contact list coming from?

u can use the flexgrid control, listview, listbox to do want to want..


game-master
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24835111
the contact list comes from server i just want an example to handle them nicely  i know listbox but its not good
0
 
LVL 13

Expert Comment

by:game-master
ID: 24836654


u can use flexgrid or listview to make it more nicer...


0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Author Comment

by:BILAL69
ID: 24837777
ok 1 question about flexgrid control i add the items in there like

--------------- code -------------------
    ContactList.AddItem Text1.Text
    ContactList.Rows = NUM_ROWS
    ContactList.Cols = 2
    ContactList.FixedRows = 0
    ContactList.FixedCols = 0
    ContactList.GridLines = flexGridNone
    ContactList.SelectionMode = flexSelectionByRow
    ContactList.RowHeightMin = imgOnline.Height + _
        ScaleY(2, vbPixels, vbTwips)
    ContactList.ColWidth(0) = imgOnline.Width
    ContactList.ColWidth(1) = 8000
    ContactList.Clear
        ContactList.Row = NUM_ROWS - 1
        ContactList.Col = 0
        Set ContactList.CellPicture = imgOnline.Picture
        ContactList.Col = 1
        ContactList.TextMatrix(NUM_ROWS - 1, 1) = Text1.Text
        NUM_ROWS = NUM_ROWS + 1
        ContactList.AddItem imgOnline.Picture
--------------------------------------------------------------------------------
now the problem is each time i use it it goes to next line and old line goes empty :-s any ideas ?
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24837789
oh remove that contactlist.additem text1.text
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24837791

    ContactList.AddItem Text1.Text
    ContactList.Rows = NUM_ROWS
    ContactList.Cols = 2
    ContactList.FixedRows = 0
    ContactList.FixedCols = 0
    ContactList.GridLines = flexGridNone
    ContactList.SelectionMode = flexSelectionByRow
    ContactList.RowHeightMin = imgOnline.Height + _
        ScaleY(2, vbPixels, vbTwips)
    ContactList.ColWidth(0) = imgOnline.Width
    ContactList.ColWidth(1) = 8000
    ContactList.Clear
        ContactList.Row = NUM_ROWS - 1
        ContactList.Col = 0
        Set ContactList.CellPicture = imgOnline.Picture
        ContactList.Col = 1
        ContactList.TextMatrix(NUM_ROWS - 1, 1) = Text1.Text
        NUM_ROWS = NUM_ROWS + 1

Open in new window

0
 
LVL 13

Accepted Solution

by:
game-master earned 125 total points
ID: 24837836


try this approach...

Private Sub Form_Load()
    formatContactList
End Sub

Sub formatContactList()
    With ContactList
        .Rows = 1
        .Cols = 2
        .ColWidth(0) = 2000
        .ColWidth(1) = 2000

        .TextMatrix(0, 0) = "Name"
        .TextMatrix(0, 1) = "Contact Number"
       
    End With
   
End Sub

'TO add item on the ContactList...
Sub addContact()
   
    With ContactList
        .AddItem "<the name to be add>" & vbTab & "<the contact to be add>"
    End With

End Sub
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24837985
Works Good.. 1 more thing.. have u noticed if u pop up a menu by right click it wont select the user first but will open the menu.. is it possible to get user selected then right menu appears :-?
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24837992
also how do i put the contact list order wise ?
0
 
LVL 13

Expert Comment

by:game-master
ID: 24838024


yes it is possible, to select first b4 pop-ups appear...

to make the contact list in order, u can manipulate your retrieval data from the server
already sorted before adding it to the flexgrid..


game-master
0
 
LVL 2

Author Comment

by:BILAL69
ID: 24838080
how is it possible to select b4 pop up appear ? lol
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question