Partilhar via


Alterar a aparência de um controle

Outlook includes several properties that you can use to define the appearance of controls in your form:

  • ForeColor determines the foreground color. The foreground color applies to any text that is associated with the control, such as the caption or the control contents.

  • BackColor and BackStyle apply to the control background. The background is the area that is within the control boundaries, such as the area surrounding the text in a control, but not the control border. BackColor determines the background color. BackStyle determines whether the background is transparent. A transparent control background is useful if your form has a background picture. For ForeColor and BackColor, you can use the color scheme defined by your system, or you can use a custom color that you pick from the color palette. Using a system color, such as Menu Text, ensures that your form matches the colors and palette used by your applications. As cores personalizadas nem sempre aparecem iguais entre sistemas e resoluções de tela, mas oferecem a escolha mais ampla de cores.

  • BorderColor, BorderStyle, and SpecialEffect apply to the control border. Use BorderStyle ou SpecialEffect para escolher um tipo de borda. Only one of these two properties can be used at a time. When you assign a value to one of these properties, the system sets the other property to None. With SpecialEffect, you can choose one of several border styles, but you can only use system colors for the border. BorderStyle supports only one border style, but you can choose any color that is a valid setting for BorderColor. BorderColor specifies the color of the control border and is only valid when you use BorderStyle to create the border.

    Nota As propriedades BorderColor, BorderStyle e SpecialEffect só podem ser aplicadas aos controles padrão fornecidos por padrão na Caixa de Ferramentas de Controle e não são aplicáveis a regiões de formulário.

O Outlook oferece suporte para transparência (ou seja, a exibição de algo por trás de um objeto, e não no plano de fundo) em duas áreas: no plano de fundo de determinados controles e em bitmaps usados em certos controles.

Você pode exibir um bitmap em muitos controles. Certain controls support transparent bitmaps — that is, bitmaps in which one or more background colors are transparent. Bitmap transparency is not controlled by any control property; it is controlled by the color of the lower-left pixel in the image. O Outlook não fornece formas de edição de um bitmap para torná-lo transparente; em vez disso, você deve usar um editor de imagem. Bitmaps são sempre transparentes nos seguintes controles: CheckBox, CommandButton, Label, OptionButton e ToggleButton. No Outlook, o seguinte não dá suporte a bitmaps transparentes: o formulário, controle de quadro , controle de imagem e controle MultiPage . Transparent pictures sometimes have a hazy appearance. Se você não gosta dessa aparência, mostre a imagem em um controle que dá suporte a imagens opacas. Se usar um bitmap transparente em um controle que não ofereça suporte para bitmaps transparentes, o bitmap será exibido corretamente, mas você não poderá ver o que está atrás do bitmap. Para obter mais informações, consulte os tópicos a seguir:

Suporte e comentários

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.