locked
How to add items to list box in windows mobile 6.0? RRS feed

  • Question

  • Hi,

     

    How to add the items to listbox in windows mobile 6.0?

    Thursday, May 19, 2011 5:53 AM

Answers

  • Hello,

    Use below code snippet for how to add items in list box.

     

     for (int i = 0; i < 5; i++)
     {
       listBox1.Items.Add("Item" + i.ToString());
     }
    


    Hope it helps.


    - Pavan [MCTS - Windows Mobile 5.0] If you find my post is helpful for you then mark as a answer and vote it.
    Thursday, May 19, 2011 6:06 AM
  • Hi Venkateswara Reddy,

     

    You can refer the public methods mentioned in MSDN Library , Operations related ListBox are available.

    Pls refer link below :

    http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.objectcollection_members(v=vs.71).aspx

     

    Hope this will help you.



    Thanks, Mohsin Shaikh |Mohzz.com

     


    • Marked as answer by Jesse Jiang Wednesday, May 25, 2011 8:03 AM
    Thursday, May 19, 2011 6:28 AM
  • On Thu, 19 May 2011 05:53:40 +0000, Venkateswara Reddy wrote:

    Hi,

     

    How to add the items to listbox in windows mobile 6.0?

    Other responses gave answers assuming you're using C#. If you are using C/C++  you can use
    LB_INITSTORAGE and related messages (or related macros defined in windowsx.h) to work with
    an actual list box or LVS_EX_FULLROWSELECT, LVM_INSERTITEM and related messages (or macros
    defined in windowsx.h) to work with a list view.

    • Marked as answer by Jesse Jiang Wednesday, May 25, 2011 8:03 AM
    Friday, May 20, 2011 8:32 PM

All replies

  • Hello,

    Use below code snippet for how to add items in list box.

     

     for (int i = 0; i < 5; i++)
     {
       listBox1.Items.Add("Item" + i.ToString());
     }
    


    Hope it helps.


    - Pavan [MCTS - Windows Mobile 5.0] If you find my post is helpful for you then mark as a answer and vote it.
    Thursday, May 19, 2011 6:06 AM
  • Hi Venkateswara Reddy,

     

    You can refer the public methods mentioned in MSDN Library , Operations related ListBox are available.

    Pls refer link below :

    http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.objectcollection_members(v=vs.71).aspx

     

    Hope this will help you.



    Thanks, Mohsin Shaikh |Mohzz.com

     


    • Marked as answer by Jesse Jiang Wednesday, May 25, 2011 8:03 AM
    Thursday, May 19, 2011 6:28 AM
  • On Thu, 19 May 2011 05:53:40 +0000, Venkateswara Reddy wrote:

    Hi,

     

    How to add the items to listbox in windows mobile 6.0?

    Other responses gave answers assuming you're using C#. If you are using C/C++  you can use
    LB_INITSTORAGE and related messages (or related macros defined in windowsx.h) to work with
    an actual list box or LVS_EX_FULLROWSELECT, LVM_INSERTITEM and related messages (or macros
    defined in windowsx.h) to work with a list view.

    • Marked as answer by Jesse Jiang Wednesday, May 25, 2011 8:03 AM
    Friday, May 20, 2011 8:32 PM