Eric Burton
asked on
Receiving "Unable to cast object of type 'System.Windows.Forms.MouseEventArgs' to type 'System.Windows.Forms.KeyPressEventArgs' ERROR
I am using the Form.ShowDialog() to move from one form to another.
When I click on a textbox on the second form I receive:
"Unable to cast object of type 'System.Windows.Forms.Mous eEventArgs ' to type System.Windows.Forms.KeyPr essEventAr gs'."
Has anyone else come across this behavior? Thanks!
When I click on a textbox on the second form I receive:
"Unable to cast object of type 'System.Windows.Forms.Mous
Has anyone else come across this behavior? Thanks!
ASKER
Thanks for your quick response. I figured out what my problem was. It was due to an incorrect event handler that I wrote within the code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solution provided.
Can you please provide the code that cause the exception.