Solved

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

Posted on 2009-07-11
12
360 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now