ISSUE #2036

    <class1> property <class1>.<pointerProperty1> does not support custom mousepointers

    Description

    CustomCursor is not supported in the same way that it was on VB6.

    Recommendations

    To create a custom cursor use the Cursor Class.

    Sample VB6

    PublicSub CustomCursor()
          Command1.MousePointer = 99
          Command1.MousePointer = VBRUN.MousePointerConstants.vbCustom
          Command1.MousePointer = vbCustom
          Command1.MouseIcon = LoadPicture("C:\Picture.cur")
    EndSub

    Target VB.NET

    PublicSub CustomCursor()
          'UPGRADE_ISSUE: (2036) CommandButton property Command1.MousePointer does not support custom mousepointers.
          Command1.Cursor = vbCustom
          'UPGRADE_ISSUE: (2064) CommandButton property Command1.MouseIcon was not upgraded.
          Command1.MouseIcon = Image.FromFile("CursorFile")
    EndSub

    Expected VB.NET

    PublicSub CustomCursor()
         Command1.Cursor = New Cursor("CursorFile")
    EndSub

    Target C#

    publicvoid CustomCursor()
    {
         //UPGRADE_ISSUE: (2036) CommandButton property Command1.MousePointer does not support custom mousepointers.
         Command1.Cursor = vbCustom;
         //UPGRADE_ISSUE: (2036) CommandButton property Command1.MousePointer does not support custom mousepointers.
         Command1.Cursor = vbCustom;
         //UPGRADE_ISSUE: (2036) CommandButton property Command1.MousePointer does not support custom mousepointers.
         Command1.Cursor = vbCustom;
    }

    Expected C#

    publicvoid CustomCursor()
    {
        Command1.Cursor =New Cursor("CursorFile");
    }


    Download VBUC Free Trial
    Download VBUC Now

    It's time to eradicate VB6
    ROI of eradicating VB6

    8 Proven Tips for
    Planning a Successful Migration

    8 Tips for migration