Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form.KeyPress
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01272436
Message ID:
01272450
Vues:
16
That is what I thought too. It seems very odd. The control in question is the WebBrowser control. I have found a workaround which involves a transparent panel covering the WebBrowser control and setting focus to the panel on the panel's MouseEnter, but I was hoping to find something cleaner. The transparent panel also serves another purpose and that is to display/hide the form's title bar.

>That doesn't sound right. With KeyPreview=true I thought the form received all relevant keyboard events *before* the control with focus?
>
>>I had not set KeyPreview to true, but I have now and it didn't change anything. It appears that if the control on the form does not handle keyboard events the keyboard events are not passed to the form.
>>
>>>Have you set the form's KeyPreview property to True?
>>>
>>>>I can't figure this out. I have a form with a control that is docked to fill. The control does not support keypress (or any key input it seems). I want to capture when a key is pressed, but the form's KeyPressed event doesn't fire. I am sure there is an easy answer but I can't figure it out.
>>>>
>>>>Thanks,
>>>>Einar
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform