Hi
I am new to windows form. I am trying to fetch ipaddress of all the systems connected to LAN, but am getting following error.
Kindly help me.
Code below.
lstLocal.View = View.Details;
lstLocal.ClearSelected();
lstLocal.GridLines = true;
lstLocal.FullRowSelect = true;
lstLocal.BackColor = System.Drawing.Color.Aquamarine;
lstLocal.Columns.Add("IP", 100);
lstLocal.Columns.Add("HostName", 200);
lstLocal.Columns.Add("MAC Address", 300);
lstLocal.Sorting = SortOrder.Descending;
Error 1 'System.Windows.Forms.ListBox' does not contain a definition for 'View' and no extension method 'View' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 31 22 DiscoverIPofAllDevices
Error 2 'System.Windows.Forms.ListBox' does not contain a definition for 'GridLines' and no extension method 'GridLines' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 33 22 DiscoverIPofAllDevices
Error 3 'System.Windows.Forms.ListBox' does not contain a definition for 'FullRowSelect' and no extension method 'FullRowSelect' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 34 22 DiscoverIPofAllDevices
Error 4 'System.Windows.Forms.ListBox' does not contain a definition for 'Columns' and no extension method 'Columns' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 36 22 DiscoverIPofAllDevices
Error 5 'System.Windows.Forms.ListBox' does not contain a definition for 'Columns' and no extension method 'Columns' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 37 22 DiscoverIPofAllDevices
Error 6 'System.Windows.Forms.ListBox' does not contain a definition for 'Columns' and no extension method 'Columns' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 38 22 DiscoverIPofAllDevices
Error 7 'System.Windows.Forms.ListBox' does not contain a definition for 'Sorting' and no extension method 'Sorting' accepting a first argument of type 'System.Windows.Forms.ListBox' could be found (are you missing a using directive or an assembly reference?) D:\Shalini Network Projects\DiscoverIPofAllDevices\DiscoverIPofAllDevices\Form1.cs 39 22 DiscoverIPofAllDevices
thank you.
shal