property Dialog.Caption as String
Retrieves or sets the control's caption.

 TypeDescription 
   String A string expression that defines the control's caption. The Caption may include HTML tags. Use the CaptionFormat property to specify whether the control displays its caption using HTML format.   

By default, the Caption property is empty. Use the Caption property to define the control's caption. Use the Picture property to assign a picture to the control. If the control has no picture associated the Caption property has no effect. 

Use the Paint event to allow owner draw control. The Caption of the control uses the BorderLeft, BorderTop, BorderRight and BorderBottom properties to define the rectangle where it is painted. The Font property defines the font used to paint the caption. The ForeColor property specifies the caption's foreground color. Use the Alignment property to align the control's caption. Use the CaptionFormat property to specify the way how data is displayed.

The following sample displays a HTML text:

With Dialog1
    .Caption = "This <b>is</b> <fgcolor=00FF00>just</fgcolor> a <r>text that should break the line. Isn't it so?"
    .CaptionFormat = exHTML
End With

Send comments on this topic.
© 1999-2006 Exontrol Inc, Software. All rights reserved.