1366 COM Integration Appendix H 24 public LabelScrollTest() (Web hosting resellers)

1366 COM Integration Appendix H 24 public LabelScrollTest() 25 { 26 InitializeComponent(); 27 28 // setup LabelScrollbar properties 29 SetupRGBTitleScrollbar( redScrollBar ); 30 SetupRGBTitleScrollbar( blueScrollBar ); 31 SetupRGBTitleScrollbar( greenScrollBar ); 32 33 // initialize PictureBox back color 34 pbColorBox.BackColor = Color.FromArgb( 35 redScrollBar.Value, greenScrollBar.Value, 36 blueScrollBar.Value ); 37 38 } // end constructor 39 40 // initialize LabelScrollBar properties 41 private void SetupRGBTitleScrollbar( 42 AxLabelScrollbar scrollBar ) 43 { 44 scrollBar.Min = 0; // minimum value 45 scrollBar.Max = 255; // maximum value 46 scrollBar.LargeChange = 10; // large change value 47 scrollBar.SmallChange = 1; // small change value 48 49 } // end method SetupRGBTitleScrollBar 50 51 // Visual Studio .NET generated code 52 53 [STAThread] 54 static void Main() 55 { 56 Application.Run( new LabelScrollTest() ); 57 } 58 59 // handles scrollbar changed event 60 private void scrollbar_Change( object sender, 61 System.EventArgs e ) 62 { 63 pbColorBox.BackColor = Color.FromArgb( 64 redScrollBar.Value, greenScrollBar.Value, 65 blueScrollBar.Value ); 66 } // end method scrollbar_Change 67 } // end class LabelScrollTest 68 } // end namespace FigH_04 Fig. H.4 ActiveX COM control integration in C#. (Part 2 of 3.)
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply