Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
663 connectés 

  FORUM HardWare.fr
  Programmation
  C#/.NET managed

  Couleur ascenseur listbox : possibilité de la changer ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Couleur ascenseur listbox : possibilité de la changer ?

n°1107548
flaeticia
.:: Night Girl ::.
Posté le 03-06-2005 à 19:01:31  profilanswer
 

Salut,  
 
Comme dit dans le titre j'aimerai changer la couleur de l'ascenceur d'une listbox : un peu comme on le fait en html : est ce possible, et si oui comment.
 
Je sais je suis vilaine avec mes question à deux balles, mais j'aime pas la couleur qu'ils ont :(  
 
 
voilà merci :)
 
bisous
 
Laeticia

mood
Publicité
Posté le 03-06-2005 à 19:01:31  profilanswer
 

n°1107613
push
/dev/random
Posté le 03-06-2005 à 21:08:11  profilanswer
 

Tu aimes la bicyclette flaeticia ?

n°1107622
fabien
Vive la super 5 !
Posté le 03-06-2005 à 21:29:37  profilanswer
 

flaeticia a écrit :


 
Je sais je suis vilaine  
 

j'aime les vilaines filles :o
 


---------------
Découvre le HFRcoin ✈ - smilies
n°1107726
flaeticia
.:: Night Girl ::.
Posté le 03-06-2005 à 23:15:13  profilanswer
 

push a écrit :

Tu aimes la bicyclette flaeticia ?


 
préfère la voiture pourquoi ?
 
Personne pour ma question :P


Message édité par flaeticia le 03-06-2005 à 23:15:37
n°1107751
push
/dev/random
Posté le 03-06-2005 à 23:43:08  profilanswer
 

J'ai trouvé ça mais j'y connaît rien en .NET, ça m'a l'air bien bourrin, en gros laisses tomber, c'est lié au thème de windows de toute façon non ?
 
 
There is no managed way to change the the background color of the scrollbar.
however we may handle the win32 message WM_CTLCOLORSCROLLBAR to change the
background color. Here is a list of steps to do this:
1. define a derived class from DataGrid
2. override WndProc and handle the WM_CTLCOLORSCROLLBAR messge.
like below:

Code :
  1. protected override void WndProc(ref Message m)
  2. {
  3. const int WM_CTLCOLORSCROLLBAR = 0x0137;
  4. const int BLACK_BRUSH = 4;
  5. if (m.Msg == WM_CTLCOLORSCROLLBAR && m.LParam == this.VertScrollBar.Handle)
  6. {
  7. m.Result = GetStockObject(BLACK_BRUSH);
  8. return;
  9. }
  10. base.WndProc (ref m);
  11. }


according to the doc of this message, you need return a HBRUSH handle , you
may create your brush object by pinvoke GDI APIs, however you need delete
them when they are no longer needed.

n°1108060
flaeticia
.:: Night Girl ::.
Posté le 04-06-2005 à 14:35:41  profilanswer
 

merci  :hello:


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C#/.NET managed

  Couleur ascenseur listbox : possibilité de la changer ?

 

Sujets relatifs
Non-persistance d'une session sauf après avoir changer les options IESelection automatique listbox
[VBS] Changer le titre de la fenêtrechanger de port dans une adresse web relative??
[HTML] Changer le curseur dans un areaafficher le contenu d'un fichier sur un listbox ou messagebox
ListBox.ItemSelected et évènement AfterUpdatechanger le fond de l'ecran
Fonction pour la couleur RVB (RGB)Erreur VBA listbox et suppression de cellules
Plus de sujets relatifs à : Couleur ascenseur listbox : possibilité de la changer ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR