NHenry
Messages postés
15113
Date d'inscription
vendredi 14 mars 2003
Statut
Modérateur
Dernière intervention
22 avril 2024
159
28 janv. 2008 à 13:38
Bonjour
Je suis allé voir, mais je n'arrive pas à le faire fonctionner :
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal _
wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const MCSC_BACKGROUND = 0 ' the background color (between months)
Private Const MCSC_TEXT = 1 ' the dates
Private Const MCSC_TITLEBK = 2 ' background of the title
Private Const MCSC_TITLETEXT = 3 ' text color of the title
Private Const MCSC_MONTHBK = 4 ' background within the month cal
Private Const MCSC_TRAILINGTEXT = 5 ' the text color of header & trailing days
Private Const DTM_SETMCCOLOR = &H1006
Et pour tester :
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_BACKGROUND, RGB(255, 0, 0)
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_TEXT, RGB(255, 255, 0)
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_TITLEBK, RGB(0, 255, 0)
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_TITLETEXT, RGB(0, 255, 255)
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_TRAILINGTEXT, RGB(0, 0, 255)
SendMessage MonthView.hwnd, DTM_SETMCCOLOR, MCSC_MONTHBK, RGB(255, 0, 255)
J'ai essayé ce code dans le Form_Load et dans un Timer, mme résultat, rien ne se passe concernant les couleurs.
Dans Word, j'Excel. (juste pour la citation)
VB (6, .NET1&2), C++, C#.Net1