How to set the designer topmost

edited 11:24PM in FastReport .NET
Hello together,

Inside of my application I'm starting the FR-designer by using
  if (_report == null)
            _report = LoadReport();
  _report.Design(true);

The Designers starts >  but not in front:angry:" border="0" alt="mad.gif" /> . How can I set the designer to front/topmost?" alt="topmost?" />[img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> Some Idee? Thanks[/img]

Comments

  • edited 11:24PM
    Solution found... >
           protected virtual void OnShowDesigner(Report report, EventBase onReportClosed)
          {
             var form = new Form();
             form.Shown += OnShowDesignerFrom;
             var designer = new DesignerControl();
             designer.Load+=Designer_Load;
             designer.Parent = form;
             designer.Report = report;
             designer.RefreshLayout();
             designer.Dock = DockStyle.Fill;
             form.WindowState = FormWindowState.Maximized;
             form.ShowDialog();
          }
    
          protected virtual void OnShowDesignerFrom(object fObject, EventArgs fArgs)
          {
             if (fObject == null) return;
             if (fObject is Form)
             {
                (fObject as Form).TopMost = true;
                Application.DoEvents();
                (fObject as Form).TopMost = false;
             }
          }
    
          private void Designer_Load(object sender, EventArgs e){ ... }
    

    Looking for the next Problem >

Leave a Comment