Skip Navigation Links
Novas Tecnologias
Ferramentas Adicionais
Ferramentas Adicionais


Dica No :
172
Assunto : Visual Basic
Titulo: Como alterar a cor da barra de título

Gostou do texto ? Vote e dê sua opinião! Pontuação atual :

Translate this page now :






Adicione aos Favoritos!
BlogBlogs Rec6 Linkk Ueba Technorati Delicious DiggIt! StumbleUpon



Podemos utilizar uma API para alterar definições do windows, tal como a cor da barra de título do windows. Para fazermos isso utilizamos a função SetSyscolor.

Veja :

Declare Function SetSysColors Lib "user32" Alias _
"SetSysColors" (ByVal nChanges As Long, lpSysColor As _
Long, lpColorValues As Long) As Long


Essa declaração pode ser inserida em um módulo para ser válida para todo o projeto ou ser inserida em um form, nesse caso precisa ser acrescido um "Private" antes do declare.

Essa função recebe 3 parâmetros : O número de cores a serem alteradas, em geral passado como 1, o código da cor a ser alterada e o valor rgb da nova cor. Para determinar o código da cor a ser alterada podemos definir constantes que facilitem o trabalho. Veja :

Const COLOR_SCROLLBAR = 0 'a cor da barra de rolamento

Const COLOR_BACKGROUND = 1 'a cor do fundo sem wallpaper
Const COLOR_ACTIVECAPTION = 2 'o texto da janela ativa
Const COLOR_INACTIVECAPTION = 3 'o texto da janela inativa
Const COLOR_MENU = 4 'o Menu
Const COLOR_WINDOW = 5 'o fundo de Windows
Const COLOR_WINDOWFRAME = 6 'a moldura da janela
Const COLOR_MENUTEXT = 7 'o text da janela
Const COLOR_WINDOWTEXT = 8 'a sombra oscura de 3D (Win95)
Const COLOR_CAPTIONTEXT = 9 'o text da janela
Const COLOR_ACTIVEBORDER = 10 'o moldura da janela ativa
Const COLOR_INACTIVEBORDER = 11 'o moldura da janela inativa
Const COLOR_APPWORKSPACE = 12 'o fundo do MDI desktop
Const COLOR_HIGHLIGHT = 13 'o fundo do item selecionado
Const COLOR_HIGHLIGHTTEXT = 14 'o item selecionado do menu
Const COLOR_BTNFACE = 15 'o Botão
Const COLOR_BTNSHADOW = 16 'a sombra do botão 3D
Const COLOR_GRAYTEXT = 17 'o texto cinza
Const COLOR_BTNTEXT = 18 'o texto do botão
Const COLOR_INACTIVECAPTIONTEXT = 19 'o texto da janela inativa
Const COLOR_BTNHIGHLIGHT = 20 'o highlight do botão 3D


Por fim, para alterar a cor podemos inserir em um botão :

Private Sub Command1_Click()
dim t as variant
t = SetSysColors(1, COLOR_ACTIVECAPTION, RGB(255, 0, 0))
End Sub

Observe a função RGB sendo utilizada para montar o código RGB da cor.



Nome :
E-mail:
Comentarios :
 
 
Os Últimos Comentários
data: 3/8/2021 12:57:00 PM
nome: MNBEYZhRfvUGyVL
email: samualg87@usa.net
comentário:
I went to https://medwynsurgery.nhs.uk/?s=%20%E2%AD%90%20Approved%20USA%20Pharmacy%20Levitra%20%E2%AD%90%20WWW.PILLS2SALE.COM%20%E2%AD%90%20Buy%20Levitra%20Online%20Usa%20-%20Buy%20Levitra%20Usa buy levitra usa
U.S. Secretary of State John Kerry said the report was a wake-up call. "Those who deny the science or choose excuses over action are playing with fire," he said, referring to skeptics who question the need for urgent action.


data: 3/7/2021 2:18:00 AM
nome: sYgafthOcx
email: shaneqtg@aol.com
comentário:
I'd like to open an account https://www.artidealab.it/goodrx-reglan-gvun buy reglan baikal-pharmacy The municipality provides the premises for the clinic, on a disused American military base, and pays the overheads. But the medical professionals - which include paediatricians, gynaecologists and cardiologists - work there for nothing.

data: 3/7/2021 2:18:00 AM
nome: JpaZkCctOO
email: mauricempp@lycos.com
comentário:
Have you got any experience? http://emdponline.com/geodon-cost-per-unit-poid geodon cost retail Calpers said in its appeal that San Bernardino did not filefor bankruptcy in good faith, did not explore any alternativesto bankruptcy, and has failed to provide any meaningfulfinancial information to creditors during the bankruptcyprocess.

data: 3/7/2021 2:18:00 AM
nome: AuWMNkPEjWw
email: elwooddyu@aol.com
comentário:
I do some voluntary work http://dangky4gvina.com/coreg-cr-40-mg-polq buy coreg baikal-pharmacy com City public safety officials said Dimas was in town last Saturday to dance at a local night club but went to the Pirates game first and was ejected by security for refusing to sit down after she was seen dancing while wearing the large unicorn head.

data: 3/7/2021 2:18:00 AM
nome: xXfBUUHKoypWVDfSAL
email: petera46@yahoo.com
comentário:
Could I take your name and number, please? http://investigatorsnorthwest.co.uk/buy-differin-baikal-pharmacycom-bkqx buy differin baikal-pharmacycom Investments in certain energy-efficient products, water heaters, central air conditions, new windows and doors, and insulation could make you eligible for tax credits this year. A new water heater or air conditioner with an Energy Star label, for example, may result in a $300 credit, while window credits are available up to $200. If you install a solar energy system (or other type of renewable energy system), you could be eligible for a tax credit of up to 30 percent of the cost. Details about these types of tax credits are available at www.energysavers.gov.

 1  
Dicas
Dica do Dia
Receba Dicas Por Email
E-mail :  
 


 (help)
Aceito receber informativos do devASPNet, informações de eventos e treinamentos

Veja Quais Informativos Você Receberá

Pesquisar Dicas
Pesquisar Artigos, Dicas e Noticias

Banco de Dados
Algumas Entrevistas
Links Importantes

Búfalo Informática, Treinamento e Consultoria
R. Alvaro Alvim, 37/920 Centro - Cinelândia - Rio de Janeiro Cep: 20031-010
Tel : (21) 2262-1368 (21) 9240-5134 E-mail : Contato@bufaloinfo.com.br