The Designer control has built-in methods to add its menus and toolbars to a Visual Studio ToolStripContainer in your end user designer project.
Prior to following these steps, add an ActiveReports Designer control and a Visual Studio ToolStripContainer to your form.
If you need help adding the Designer control to your Visual Studio toolbox, see Adding ActiveReports Controls. |
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the Load event. |
Copy Code |
---|---|
Dim menuStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Menu)(0) Dim editStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Edit)(0) Dim formatStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Format)(0) Dim layoutStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Layout)(0) Dim reportStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Report)(0) Dim undoStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Undo)(0) Dim zoomStrip As ToolStrip = Me.Designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Zoom)(0) Me.ToolStripContainer1.TopToolStripPanel.Join(menuStrip, 0) Me.ToolStripContainer1.TopToolStripPanel.Join(editStrip, 1) Me.ToolStripContainer1.TopToolStripPanel.Join(formatStrip, 2) Me.ToolStripContainer1.TopToolStripPanel.Join(layoutStrip, 3) Me.ToolStripContainer1.TopToolStripPanel.Join(reportStrip, 4) Me.ToolStripContainer1.TopToolStripPanel.Join(undoStrip, 5) Me.ToolStripContainer1.TopToolStripPanel.Join(zoomStrip, 6) |
To write the code in C#
C# code. Paste INSIDE the Load event. |
Copy Code |
---|---|
ToolStrip menuStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Menu)[0]; ToolStrip editStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Edit)[0]; ToolStrip formatStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Format)[0]; ToolStrip layoutStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Layout)[0]; ToolStrip reportStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Report)[0]; ToolStrip undoStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Undo)[0]; ToolStrip zoomStrip = this.designer1.CreateToolStrips(DataDynamics.ActiveReports.Design.DesignerToolStrips.Zoom)[0]; this.toolStripContainer1.TopToolStripPanel.Join(menuStrip, 0); this.toolStripContainer1.TopToolStripPanel.Join(editStrip, 1); this.toolStripContainer1.TopToolStripPanel.Join(formatStrip, 2); this.toolStripContainer1.TopToolStripPanel.Join(layoutStrip, 3); this.toolStripContainer1.TopToolStripPanel.Join(reportStrip, 4); this.toolStripContainer1.TopToolStripPanel.Join(undoStrip, 5); this.toolStripContainer1.TopToolStripPanel.Join(zoomStrip, 6); |
ToolStrips at Run Time
ToolStrip Name | Run-Time |
---|---|
Menu |
The File menu includes these commands: New, Open, Save, and Export. The Edit menu includes these commands: Undo, Redo, Cut, Copy, Paste, Delete, and Select All. |
Edit |
The Edit tool strip includes these tools: Cut, Copy, Paste, and Delete. |
Format |
The Format tool strip includes these tools: Font Name, Font Size, Bold, Italic, Underline, Fore Color, Back Color, Align Left, Align Center, Align Right, Align Justify, Indent, and Outdent. |
Layout |
The Layout tool strip includes these tools: Align to Grid, Align Lefts, Align Centers, Align Rights, Align Tops, Align Middles, Align Bottoms, Bring to Front, and Send to Back. |
Report |
The Report tool strip includes these tools: New, Open, and Save. |
Undo |
The Undo tool strip includes these tools: Undo and Redo. |
Zoom |
The Zoom tool strip includes these tools: Zoom Out, Zoom In, Zoom %, and Actual Size. |