Hi,
i created a .net usercontrol using VB 2005. I see that keypress event is not fired in the UserControl when any key is pressed. However the keypress event of the textbox in the UserControl alone gets fired.
In VB 6, this worked perfectly. Keypress events for forms are enabled using keypreview property.
I don't see any such property for a usercontrol.
Can some help, how to enable keypress event of a UserControl.
Any help in this regard is appreciated.
Thanks,
Sugan

.Net UserControl Keypress event
KarlH
Sorry. I'm a newbie and don't understand this code.
Could you explain what this code does and where this code needs to be inserted.
Also i want to keypress events of both the UserControl and the textbox in the UserControl to be enabled.
Thanks for spending time on this.
Once againThanks,
Sugan
Smurble
{
//Do custom processing here
return base.ProcessKeyPreview(ref m);
//You can use the parameters in m to process keys
}
desperate108146