Changing Dialog Form Settings by code
Hi, i need to modify some dialog form's settings. I'm using this algorithm:
I'm facing this problem. If i set the property StartPosition to Manual and set a Location, after the Prepare() method, this setting is changed to CenterScreen, and the dialog was shown in the center of the screen. Is this a bug or by-design? Is there a workaround?
Thank you.
foreach (FastReport.Base obj in objReport.AllObjects)
{
FastReport.Dialog.DialogPage objDialogPage = obj as FastReport.Dialog.DialogPage;
if (objDialogPage != null)
{
objDialogPage.Form.StartPosition = FormStartPosition.Manual;
objDialogPage.Form.Location =.....etc
}
}
I'm facing this problem. If i set the property StartPosition to Manual and set a Location, after the Prepare() method, this setting is changed to CenterScreen, and the dialog was shown in the center of the screen. Is this a bug or by-design? Is there a workaround?
Thank you.
Comments
This is by design, FastReport always uses CenterScreen for dialogs. You can however change this in the form.Load event (in the report code):