Surendra Sharma

Surendra Sharma

Search This Blog

Tuesday, July 23, 2013

’Value of type 'Microsoft.VisualBasic.FileAttribute' cannot be converted to 'System.Windows.Forms.Cursor'.

During migration from VB to VB.NET if you are getting error as "’Value of type 'Microsoft.VisualBasic.FileAttribute' cannot be converted to 'System.Windows.Forms.Cursor'." with following type of code

'UPGRADE_ISSUE: Unable to determine which constant to upgrade vbNormal to. 'UPGRADE_ISSUE: Screen property Screen.MousePointer does not support custom mousepointers.
'UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior.
System.Windows.Forms.Cursor.Current = vbNormal

Solution: -
Use “Cursors.Default” as below


System.Windows.Forms.Cursor.Current = Cursors.Default

2 comments:

  1. Thank You!
    this isnt the first upgrade issue your posts help me with

    ReplyDelete