你写的不清楚。别人看不明白。所以不知道怎么回。

解决方案 »

  1.   

    对,不知道你说的是listbox还是combobox,这两个命令是不同的。
    按照combobox回答一下        const int CB_GETCOUNT = 0x0146;
            const int CB_GETLBTEXT = 0x0148;
            const int CB_SETCURSEL = 0x014e;
            [DllImport("user32.dll")]
            static extern int SendMessage(IntPtr hwnd, int msg, int wParam, int lParam);            //获得选项数量
                int count = SendMessage(comboBox1.Handle, CB_GETCOUNT, 0, 0);
                //获得指定索引的选项内容,索引index
                byte[] b = new byte[10];
                fixed (byte* p = b)
                {
                    SendMessage(comboBox1.Handle, CB_GETLBTEXT, index, (int)p);
                }
                string s = Encoding.Unicode.GetString(b);
                //选择指定索引的选项,索引index
                SendMessage(comboBox1.Handle, CB_SETCURSEL, index, 0);
      

  2.   

    楼主实现 了吗? 如果 实现 的话 分享一下谢谢
      

  3.   

    上面 的那个  P是 什么 啊,高手
      

  4.   

    上面 的那个  P是 什么 啊,高手
    指针!明确的告诉大家,C#是有指针的!!