单项选择题
You are creating a Windows Forms application by using the .Net Framework 3.5.You plan to design a composite control for the application.You need to derive the control from a base class that supports templates.What should you do?()
A.Derive from the Control class.
B.Derive from the UserControl class.
C.Derive from the ScrollableControl class.
D.Derive from the ContainerControl class.
相关考题
-
单项选择题
YouarecreatingaWindowsFormsApplicationbyusingthe.NETFramework3.5.Usersusetheapplicationtoprocessandapproveinvoices.AlistofrecentlyaccessedinvoicesisstoredintheuserssettingssectionoftheApp.configfile.Youneedtomaintainthelistofinvoicesfromthelastpersistedstate.Whatshouldyoudo?()
A.Use the Properties.Settings object during runtime.
B.Use the Properties.Settings.Default object during runtime.
C.Use the ConfigurationManager.AppSettings object during runtime.
D.Use the ConfigurationManager.GetSection method during runtime. -
单项选择题
You are creating a Windows Forms application by using the .Net Framework 3.5.You create an instance of a Backgroundworker component named backgroundWorker1 to process operations that take a long time.You discover that when the application attempts to report the progress,you receive a System.InvalidOperationException exception when executing thebackgroundWorker1.ReportProgress method.You need to configure the BackgroundWorker component appropriately to prevent the application from generating exceptions. What should yo do?()
A.Set the Result property of the DoWorkEventArgs instance to True before you attempt to report the progress.
B.Set the CancellationPending property of backgroundWorker1 to True before you attempt to report the background process
C.Set the WorkerReportsProgress property of backgroundWorker1 to True before you attempt to report the background process.
D.Report the progress of the background process in the backgroundWorker1_ProgressChanged event. -
单项选择题
You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement: (1)It retrieves data from a MSSQL Server 2008 database instance. (2)It uses WPF classes to display data. (3)It uses user-customizable actions when the control is first painted on the form. What should you do?()
A.Create a new custom class for the control that is derived from the Control class.
B.Create a new custom class for the control that is derived from the UserControl class.
C.Create a new custom class for the control that is derived from the ContentControl class.
D.Create a new custom class for the control that is derived from the ContentPresenter class.
