473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

location of the Dialog form

153 100+
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();
}
}





Jan 6 '09 #1
2 1629
Plater
7,872 Expert 4TB
Could you use the PointToScreen function?
Jan 13 '09 #2
akshaycjoshi
153 100+
Yes Plater, I did it and it's ok now.
Ty.
Jan 14 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ramsey Schaffnit | last post by:
Context: I have to print personal information on a preprinted form I've never seen using a printer I've never seen. I want to use a control to overlay the PrintPreview to indicate where I've...
2
by: mark | last post by:
I am developing an application in .Net C# that needs to restore a number of tool windows to some previous location and size. The problem I have is that when I create the form and set the Location...
2
by: Robert W. | last post by:
In my WinForms application, I have a main form, which may or may not be visible depending on the user's wishes. This main form initiates a separate thread that starts a data transfer process. ...
1
by: Andrew Venmore | last post by:
Hello, I have a base dialog form with a panel docked to the bottom with an OK and a Cancel button in it (all Modifiers=Protected, buttons' Anchor=Top,Right). At design time the size of the base...
3
by: dhnriverside | last post by:
Hi peeps I'm developing an intranet application which uses a main window and various popups created with javascript ( window.open() ). When the user saves what they are doing in the popup, i...
7
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their...
1
by: David Veeneman | last post by:
I'm having a problem getting design-time property binding to work with a form's size and location properties. I started with the Location property under Application Settings in the Properties...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
5
by: veer | last post by:
Hi i am getting probleum in running the exe on any other location on my computer except bin\debug when i execute the exe file which is in bin\debug folder it works fine and when i copy this exe and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.