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 tsmiaddextensio n is the ToolStripMenuIt em which is clicked.
private void tsmiaddextensio n_Click(object sender, EventArgs e)
{
string selnodetext = treeexchange.Se lectedNode.Text ;
AddExtensionDia log aed = new AddExtensionDia log(treeexchang e.SelectedNode. Text);
aed.Location = new Point(treeexcha nge.Right/2, treeexchange.To p*5);
this.Text = aed.Location.To String();
if (aed.ShowDialog () == DialogResult.OK )
{
refreshtree();
foreach(TreeNod e tn in treeexchange.No des[0].Nodes)
if(tn.Text==sel nodetext)
tn.Expand();
}
}

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 tsmiaddextensio n is the ToolStripMenuIt em which is clicked.
private void tsmiaddextensio n_Click(object sender, EventArgs e)
{
string selnodetext = treeexchange.Se lectedNode.Text ;
AddExtensionDia log aed = new AddExtensionDia log(treeexchang e.SelectedNode. Text);
aed.Location = new Point(treeexcha nge.Right/2, treeexchange.To p*5);
this.Text = aed.Location.To String();
if (aed.ShowDialog () == DialogResult.OK )
{
refreshtree();
foreach(TreeNod e tn in treeexchange.No des[0].Nodes)
if(tn.Text==sel nodetext)
tn.Expand();
}
}

Comment