Get the file name from the OpenFileDialog.FileName property, and use string.Split to break it into it's component folders with the backslash character.
Then loop through each string in the array Split returns, creating a new node for each and add it into the Nodes property of the previous one.
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
string[] parts = ofd.FileName.Split('\\');
TreeNodeCollection previousNodes = myTreeView.Nodes;
foreach (string part in parts)
{
TreeNode node = new TreeNode(part);
previousNodes.Add(node);
previousNodes = node.Nodes;
}
myTreeView.ExpandAll();
}