Solved

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

Posted on 2009-07-11
12
361 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 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