Can we use ActiveX controls to build applications under .NET?
This is applicable only to COM objects. For instance, the System.Windows.Forms.ListBox component uses the “LISTBOX” window. As you already know sending the LB_ADDSTRING message to a listbox window adds a new item. Here’s a simple sample that can be used in c#. All that you need to do before copying the code is to create a new c# application, and to insert a listbox component to the main form. [DllImport(“User32.DLL”)] public static extern long SendMessage( int hWnd, int Msg, int wParam, string lParam ); private void Form1_Load(object sender, System.EventArgs e) { SendMessage( listBox1.Handle.ToInt32(), 0x0180 /*LB_ADDSTRING*/, 0, “test”); } Obviously, if you call listBox1.Items.Add(“test”) the last thing that listbox does is to call SendMessage function. The things are the same for ListView, TreeView, ComboBox components, and so on. In your .NET application, all these mean that you are safe to use an ActiveX control. Using the ActiveX version will be faster than using the same version