eEventArgs',to,type,'System.Windows.Forms.KeyPressEventArgs',ERROR" /> Receiving "Unable to cast object of type 'System.Windows.Forms.MouseEventArgs' to type 'System.Windows.Forms.KeyPressEventArgs' ERROR - Problems and solutions to issues related to Software : Business, Database, Firewalls, Office, Graphics, Security, System, Server.

Question : 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.MouseEventArgs' to type System.Windows.Forms.KeyPressEventArgs'."

Has anyone else come across this behavior?  Thanks!

Answer : Receiving "Unable to cast object of type 'System.Windows.Forms.MouseEventArgs' to type 'System.Windows.Forms.KeyPressEventArgs' ERROR

1.  I note the runtime is still 2.0-based.  
        3.5 is the extension of 2.0. That's why the base framework is 2.0.
        .net IDE will convert it to 3.5 by itself. Just click on yes

2.  Are there any "gotcha's" anyone can think of to be concerned with a web-application conversion?
       Not at all

3.  Any other issues or thoughts anyone has after having done such a conversion themselves?
      Already answered

Just convert it. You will not find any issue. :)
Random Solutions  
 
programming4us programming4us