Gets or sets a value indicating whether the dialog box displays the color choice. Gets or sets a value indicating whether the dialog box contains an Apply button. Gets or sets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set. Gets values to initialize the FontDialog. Gets or sets the minimum point size a user can select. Gets or sets the maximum point size a user can select. Gets or sets a value indicating whether the dialog box specifies an error condition if the user attempts to select a font or style that does not exist. Gets or sets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts. Gets the list of event handlers that are attached to this Component. Gets a value that indicates whether the Component is currently in design mode. Gets the IContainer that contains the Component. Gets a value indicating whether the component can raise an event. Gets or sets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts. Gets or sets a value indicating whether the dialog box allows vector font selections. Gets or sets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations. Gets or sets a value indicating whether the user can change the character set specified in the Script combo box to display a character set other than the one currently displayed. Initializes a new instance of the FontDialog class. For a list of these values, see the FontDialog constructor. When you create an instance of FontDialog, some of the read/write properties are set to initial values. HookProc can be overridden to implement specific dialog box hook functionality. The inherited member ShowDialog must be invoked to create this specific common dialog box. If fontDialog1.ShowDialog() DialogResult.Cancel Then Private Sub button1_Click(sender As Object, e As System.EventArgs) If(fontDialog1.ShowDialog() != DialogResult.Cancel ) Private void button1_Click(object sender, System.EventArgs e) TextBox1->ForeColor = fontDialog1->Color If ( fontDialog1->ShowDialog() != ::DialogResult::Cancel ) Void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )įontDialog1->Color = textBox1->ForeColor The Font contains the size information but not the color information. It also requires that the fontDialog1 has been created. This code requires that a Form has already been created with a TextBox and button placed on it. The following code example uses ShowDialog to display a FontDialog.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |