Archive : Windows Forms

RSS feed
get machine name and ip address C#

get machine name and ip address C#

be sure to use the following namespace using System.Net; we will create a method that sends out machine name and ip address as output parameters void getMachineInfo(out string MachineName, out string IPAddress) { MachineName= Dns.GetHostName(); IPHostEntry iphostentry = Dns.GetHostByName(MachineName); IPAddress = iphostentry.AddressList[0].ToString(); } you wanna call the method like : string [...]
Gradient Datagridview Columns Header C#

Gradient Datagridview Columns Header C#

Unfortunately datagridview does not support gradient columns header , there’s a work around it : first thing we need to do is to handle the CellPainting Event of the Datagridview . put this segment of code on the top of code page of the Form //to use brushes , and graphics using System.Drawing; using System.Drawing.Drawing2D; in the CellPainting Event of the datagridview post the following [...]
© 2010 Programming online. All rights reserved.
WordPress Blog
freshlife WordPress Themes Theme Junkie