See the two pics below.
The form should have it's top-left corner to the end of the node that is clicked,even if i move the main form.
How would i set the location property of the newly showed form ?
Here is the code in which tsmiaddextension is the ToolStripMenuItem which is clicked.
private void tsmiaddextension_Click(object sender, EventArgs e)
{
string selnodetext = treeexchange.SelectedNode.Text;
AddExtensionDialog aed = new AddExtensionDialog(treeexchange.SelectedNode.Text) ;
aed.Location = new Point(treeexchange.Right/2, treeexchange.Top*5);
this.Text = aed.Location.ToString();
if (aed.ShowDialog() == DialogResult.OK)
{
refreshtree();
foreach(TreeNode tn in treeexchange.Nodes[0].Nodes)
if(tn.Text==selnodetext)
tn.Expand();
}
}