Click here to Skip to main content
15,896,375 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi How to set my widow position to be inside my frame or panel or rectangle?
C#
frmTrnSummary objTrnSummary = new frmTrnSummary();
objTrnSummary.Owner = this;
objTrnSummary.Height = 410;
objTrnSummary.Width = 992;
objTrnSummary.ShowDialog();
var location = frame1.PointToScreen(new Point(100, 100));
objTrnSummary.Left = 0;
objTrnSummary.Top = 0;


I tried this but not working.
Posted

1 solution

Note that location is declared, initialized, but never used. If this is not so, you show wrong code fragment. Never ignore compilation warning.

That's all, based on you insufficient information. You don't explain what it "this", frmTrnSummary and other relevant detail.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900