M
Mike Fechner
Guest
Hi, the code looks indeed strange. Let me start by clearing up the terms Control and Component. A component is a class that can be used in the context of the Visual Designer. The minimum requirement for a Component is that it implements the IComponent Interface. Components are placed on the yellow space at the bottom of the Visual Deisgner. Typical components are the BindingSource, Timer, UltraToolbarController etc.. Components typically have two constructors, one with no parameters, one with the IContainer parameter. When the IContainer parameter constructor is present, the generated code, passes the Container to the component constructor. A Control derives from System.Windows.Forms.Control (which your UserControl does). Controls are also components. But Controls appear on the design instance of the Form in the Visual Designer. Controls typically only have the Constructor with no parameter. Controls are added to the Controls Collection of the Form (or another ContainerContainer in the Form). Your code looks strange as the thumbNailXpress1 instance has typical Control properties like Location, Name and Size but it's not added to the Controls collection of the Form. You may try that yourself: THIS-OBJECT:Controls:Add (THIS-OBJECT:thumbnailXpress1). But the code should be created properly. I'd report that to PSC tech support. It might help telling them, that the Control works on your system as expected in the MS Visual Studio.
Continue reading...
Continue reading...