![]() ![]() ![]() Please note that other Pearson websites and online products and services have their own separate privacy policies. This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. ![]() Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site. That uses each of the dialogs in different ways. In the Downloads section for the day, I've included a sample application If OpenFileDialog1.ShowDialog() = DialogResult.OK Thenĭim sr As New System.IO.StreamReader(OpenFileDialog1.FileName) Listing 3.7 Opening a File with a StreamReader and (you'll learn about them next week) and OpenFileDialog, as Listingģ.7 demonstrates. You can also read files using a combination of the System.IO classes StringType.StrCmp(openFileDialog.FileName, "", false) != 0)īase.Cursor = new Cursor(openFileDialog.OpenFile()) If (openFileDialog.ShowDialog() = DialogResult.OK & OpenFileDialog.Title = "Select a Cursor File" OpenFileDialog.Filter = "Cursor Files|*.cur" Me.Cursor = New Cursor(openFileDialog1.OpenFile())Ĭ# OpenFileDialog openFileDialog = new OpenFileDialog() ' Assign the cursor in the Stream to the Form's Cursor property. If openFileDialog1.ShowDialog() = DialogResult.OK Then ' If the user clicked OK in the dialog and OpenFileDialog1.Title = "Select a Cursor File" OpenFileDialog1.Filter = "Cursor Files|*.cur" VB.NET ' Display an OpenFileDialog so the user can select a Cursor.ĭim openFileDialog1 As New OpenFileDialog() OpenFileDialog to prompt the user for cursor files. After you add a control, you can use its properties and methods The Common Dialog controls are nonvisual controls that areĪdded to a form. Table 3.6 Common Dialog Controlsĭisplays the color picker dialog box that enables users to set the color ofĭisplays a dialog box that enables users to set a font and its attributesĭisplays a dialog box that enables users to navigate to and select a fileĭisplays a dialog box that enables users to select a printer and set itsĭisplays a dialog box that shows how a PrintDocument object appearsĭisplays a dialog box that allows users to save a file Table 3.6 lists the available Common Dialog controls. The Common Dialog controls in Windows Forms enable you to performĭialog-related tasks. Learn More Buy Using Common Dialog Controls ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |