Web site design and hosting - 1364 COM Integration Appendix H Once students register

1364 COM Integration Appendix H Once students register the ActiveX control, they must add it to the Visual Studio IDE s toolbox. To accomplish this, right click the toolbox and select Customize Toolbox (Fig. H.2). The Customize Toolbox lists all the COM components that are registered on the machine. Select the Deitel LabelScrollbar .OCX file to add the LabelScrollbar to the toolbox and then click OK. When you add the LabelScrollBar to your Web form Visual Studio generates libraries Deitel and AxDeiteland adds them to the references in the Solution Explorer. The first reference (Deitel) is the Common Runtime Library proxy, which allows the programmer to access the ActiveX component s methods and properties from .NET code. The second reference (AxDeitel) is the Windows Forms proxy, which allows the programmer to add the ActiveX component to a form. In this context a proxy is an object which allows .NET code to interact with COM code, we discuss the interaction between .NET and COM in greater detail in the next section. Note that, once the LabelScrollbar is added to the toolbox, two DLL files are generated in the bindirectory of the application: AxInterop.Deitel.dlland Interop.Deitel.dll. The first image in Fig. H.3 depicts the IDE toolbox after the LabelScrollBarhas been added. The second image displays a list of the LabelScrollBar control properties, consisting of properties defined in the ActiveX control (i.e., Min, Max, Small- Change, LargeChange, and Value) and Visual Studio-defined properties (e.g., Anchor, Dockand Location). To demonstrate LabelScrollBar s functionality, we add three LabelScrollbars to a form (Fig. H.4). These controls enable a user to select RGB values (i.e., red, green and blue) that specify the color of a PictureBox. Fig. H.2 Fig. H.2Fig. H.FiFi2g. H.2g. H.2Customize Toolbox dialog with an ActiveX control selected.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply