Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

Separate version for Access/Office 2003, 2002, and 2000.

Separate version for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

Microsoft Access, Office/VBA, VB6 Modules royalty-free source code libraryMicrosoft Access Modules royalty-free source code libraryMicrosoft Access VBA and VB6 Module Library Free trial of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA

Class: ColorDialog in Category Windows : Common Dialogs from Total Visual SourceBook

Displaying the Windows Choose Color Common Dialog in VB6 and VBA with support for 32 and 64 bit API calls

Procedure List

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CColorDialog class
Color Property Get the current color
Flags Property Get the flags.
Class_Initialize Initialize Set initial values
Show Method Display the choose color common dialog.

Example Code for Using Class: ColorDialog

' Example of CColorDialog
'
' To try this example, do the following:
' 1. Create a new form
' 2. Add a command button 'cmdTest'
' 3. Paste all the code from this example to the new form's module
' 4. Run the form

Private Sub cmdTest_Click()
  ' Comments: Example of using the CColorDialog class to select colors from the Windows Common Control Color Dialog.
  '           As you select a color from the dialog, the color of the text on the button changes.

  Dim clsColorDialog As CColorDialog

  ' Initialize the class
  Set clsColorDialog = New CColorDialog

  ' Set the default color
  clsColorDialog.Color = vbRed

  ' Set flags as desired
  clsColorDialog.Flags = colFullOpen + colRgbinit

  ' Show dialog and test if a color was selected
  If clsColorDialog.Show() Then
    ' Change the text color of the button
    Me.cmdTest.ForeColor = clsColorDialog.Color
  End If

  ' Clean up
  Set clsColorDialog = Nothing

End Sub

Microsoft Access Module LibraryOverview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources