I'm trying to implement VB.Net scenario in C#.
In VB.Net I have an MDI application with MDI form and several child forms.
MDI has a List Bar control on the left.
Child forms load and occupying the entire client area of MDI.
On of the child form (frmCoordinator) may load another form (frmBidCalendar) and that form should have exact the same size and location as the caller.
There is the code in the frmBidCalendar_Load:
I tried this in C#:Code:Dim rectCaller As Rectangle
Dim rectLocation As Rectangle
Try
rectCaller = frmCoordinator.ClientRectangle
rectLocation = frmCoordinator.RectangleToScreen(rectLocation)
Me.Size = rectCaller.Size
Me.Location = rectLocation.Location
and it says 'The name frmCoordinator doesn't exist in the current contents'Code:rectCaller = frmCoordinator.ClientRectangle();
I tried this:
and it says 'An object reference is required...'Code:rectCaller = Coordinator.ClientRectangle;
How can I translate VB.Net code to C#?
Thank you