using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Cx.Interfaces; namespace App { public partial class Form1 : Form { public Form1(List<ICxVisualComponent> visualComponents) { InitializeComponent(); Size extents = new Size(0, 0); Activated += new EventHandler(OnActivated); foreach (ICxVisualComponent comp in visualComponents) { ICxVisualComponentClass instance = (ICxVisualComponentClass)((ICxComponent)comp).Instance; instance.Register(this, comp); extents = Program.UpdateExtents(this, comp, extents); } if (extents != new Size(0, 0)) { Size = extents + new Size(25, 40); } } protected void OnActivated(object sender, System.EventArgs e) { Program.currentForm = this; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)