private void tvwACH_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
{
string strFile = string.Empty;
if (e.Node.Parent.Text == "FileHeader")
{
strFile = e.Node.ToString();
string str = strFile.Substring(10);
StringComparison compareType = StringComparison.InvariantCultureIgnoreCase;
string fileName = Path.GetFileNameWithoutExtension(str);
string extension = Path.GetExtension(str);
if (extension.Equals(".txt", compareType))
{
StringBuilder osb = new StringBuilder();
objFileHeader.getFileHeader(str, out osb);
e.Node.ToolTipText = Convert.ToString(osb);
}
}
But if i had my mouse on the root node i am getting an error as null exceptio handled. If i had my mouse hover the root node nothing should be happened. Can any one help me please.

Dorababu MekaRank #457 · 5.5K reputationPosted Jun 17, 2011, 12:01 AM EDT
if (e.Node.Parent != null && e.Node.Parent.Text == "FileHeader") { // Your code goes here }Ish BandhuRank #1,415 · 1.2K reputationPosted Jun 16, 2011, 10:19 PM EDT
Chaitanya57 reputationPosted Jun 17, 2011, 12:00 AM EDT
Chaitanya57 reputationPosted Jun 17, 2011, 12:53 AM EDT