Posted by Pharaoh on October 19, 2010 ·
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 [...]
Posted by Pharaoh on October 18, 2010 ·
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 [...]