Changing Dialog Form Settings by code

Hi, i need to modify some dialog form's settings. I'm using this algorithm:
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

  • edited 3:51PM
    Hello,

    This is by design, FastReport always uses CenterScreen for dialogs. You can however change this in the form.Load event (in the report code):
        private void Form1_Load(object sender, EventArgs e)
        {
          Form1.Form.StartPosition = FormStartPosition.Manual;
          Form1.Form.Location = new Point(10, 10);
        }
    

Leave a Comment