Solved

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

Posted on 2009-07-11
12
359 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

23 Experts available now in Live!

Get 1:1 Help Now