La abadia de la reconquista

Solo disponible en BuenasTareas
  • Páginas : 3 (548 palabras )
  • Descarga(s) : 0
  • Publicado : 6 de mayo de 2010
Leer documento completo
Vista previa del texto
Common Dialogs
I have seen many examples on , that have messed up
Common Dialogs , mainly when it comes to the font dialog. This tutorial should teach you all you need to know for commondialogs.

Flags - These are simply options or choices you can use.

Using the flags:
'Setting it for use
CommonDialog.Flags = &H1
'Setting it for use of more than oneCommonDialog.Flags = &H1 Or &H4

Activating Dialogs:
This is simply the code to start up each dialog box.

CommonDialog.ShowColor 'Lets the user pick a color
CommonDialog.ShowFont 'Lets the user pick fontCommonDialog.ShowOpen 'Lets the user pick a file to open
CommonDialog.ShowPrinter 'Shows Printer Setup
CommonDialog.ShowSave 'Lets the user pick a file to save to

The following aresome flags for using the Color dialog boxes.

&H1 - This is one i personally like. This makes the common dialog start showing its current color.
&H2 - This starts with the custom color tab open.&H4 - This makes it so they can not create custom colors.
&H8 - This adds a help button to the dialog.
&H10 - This will reset the common dialog to default.

The following are some flagsfor using the Font dialog boxes.

&H1 - Allows the dialog only to list fonts supported by the system.
&H2 - Allows the dialog only to list fonts supported by the printer.
&H3 - Lists the fontsfrom the two above.
&H4 - Adds a help button.
&H100 - Allows the choices of underline strike thru and color selection.
&H2000 - Shows only font sizes between the min and max.
&H20000 - Allows onlyfonts that can be scaled.
&H40000 - Allows only true type fonts

Applying to a textbox - For each property you must set it here is an example
that sets it assuming you have &H100 and have a textboxnamed Text1

Text1.FontName = CommonDialog.FontName
Text1.FontItalic = CommonDialog.FontItalic
Text1.FontBold = CommonDialog.FontBold
Text1.FontStrikethru = CommonDialog.FontStrikethru...
tracking img