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 4:12PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.