c# listbox使用 大家好我用vc++做了一个dll 里面有一个 字符串,用来接收网络数据,当接到数据后,如何显示在 c# 的 listbox中呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果都是vc++的话可以用指针指过去添加,但这个是c#怎么办呢??? C#的话,可以使用out string或者StringBuilder去接收哟。 举例说明:using System.Text;using System.Runtime.InteropServices;[DllImport("vc.dll", EntryPoint="方法名", ExactSpelling=false, CallingConvention=CallingConvention.Cdecl)]private extern int 方法名(out string 你想要的); 你应当没有理解我的意思我知道如何接受,是想让他能够及时地显示在listbox中,例如qq 一旦别人给你发了消息,就可以在listbox中显示 我用的是dll接收 存储 消息,提供一个函数读出, 不好意思,理解错了。ListBox不是也有DataSource吗?使用DataSource,每次收到消息以后加入到数据源DataSource,重新绑定一下可以吗? 如何直接保存datagridview的数据 使用SqlDataAdapter对数据库中表的查询 WPF通过xaml初始化一个类的对象后,从代码怎么访问这个对象? 数据库连接原因 用C#如何才能得到视频文件的"播放时长"呢??? 字符转换? nhibernate2.0生成oracle实体类字段类型问题 请教一个窗口特效 关于win2000信使服务的问题 在NetFrame中如何利用OpenFileDialog来选取目录? picturebox无法显示 【WinForm学习第二帖】多线程读取文本
using System.Text;
using System.Runtime.InteropServices;[DllImport("vc.dll",
EntryPoint="方法名",
ExactSpelling=false,
CallingConvention=CallingConvention.Cdecl)]
private extern int 方法名(out string 你想要的);
我知道如何接受,是想让他能够及时地显示在listbox中,例如qq 一旦别人给你发了消息,就可以在listbox中显示