Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent Combox From Opening
Message
De
04/07/2008 13:26:37
John Baird
Coatesville, Pennsylvanie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01328995
Message ID:
01329004
Vues:
16
public class MyComboBox : ComboBox 
     protected override void WndProc(ref System.Windows.Forms.Message m) 
     { 
           if (m.Msg == 0x201 //WM_LBUTTONDOWN || m.Msg == 0x203)  //WM_LBUTTONDBLCLK 
           {
                return; 
           }
          base.WndProc(ref m); 
     } 
}  

or

Public Class MyComboBox 
     Inherits ComboBox 
     Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) 
          If m.Msg = &H201 OrElse m.Msg = &H203 Then 'WM_LBUTTONDOWN or WM_LBUTTONDBLCLK 
               Return 
          End If 
          MyBase.WndProc(m) 

     End Sub 'WndProc 
End Class 'MyComboBox 
 
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform