cursor Resources elp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    cursor Resources elp

    Hi,

    I have a user control and i have added .cur cursor files to the project
    and trying to set .Cursor to new Cursor(gettype( ), "cursorname.cur "); and I
    am getting

    An unhandled exception of type 'System.Argumen tNullException' occurred in
    system.windows. forms.dll

    Additional information: Value cannot be null.


    Any ideas? The .cur reference is matching case and the .cur is in the
    project.

    Thanks


  • James Westgate

    #2
    Re: cursor Resources elp

    Make sure it is an embedded resource and make sure that the cursor name
    doesnt match a class name

    James

    --
    Create interactive flowcharts, diagrams and UML models with ERM3 at


    <discussion@dis cussion.microso ft.com> wrote in message
    news:uNrFq7$sDH A.3496@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Hi,
    >
    > I have a user control and i have added .cur cursor files to the project
    > and trying to set .Cursor to new Cursor(gettype( ), "cursorname.cur "); and[/color]
    I[color=blue]
    > am getting
    >
    > An unhandled exception of type 'System.Argumen tNullException' occurred in
    > system.windows. forms.dll
    >
    > Additional information: Value cannot be null.
    >
    >
    > Any ideas? The .cur reference is matching case and the .cur is in the
    > project.
    >
    > Thanks
    >
    >[/color]


    Comment

    • Guest's Avatar

      #3
      Re: cursor Resources elp

      It is in the property panel as an "embedded resource" and its not matching
      the class name.

      Still a ARg null error arrr arg argghhh..



      "James Westgate" <james@nospam.c rainiate.com> wrote in message
      news:ukgwmnAtDH A.4060@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Make sure it is an embedded resource and make sure that the cursor name
      > doesnt match a class name
      >
      > James
      >
      > --
      > Create interactive flowcharts, diagrams and UML models with ERM3 at
      > http://www.crainiate.net
      >
      > <discussion@dis cussion.microso ft.com> wrote in message
      > news:uNrFq7$sDH A.3496@TK2MSFTN GP11.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I have a user control and i have added .cur cursor files to the[/color][/color]
      project[color=blue][color=green]
      > > and trying to set .Cursor to new Cursor(gettype( ), "cursorname.cur ");[/color][/color]
      and[color=blue]
      > I[color=green]
      > > am getting
      > >
      > > An unhandled exception of type 'System.Argumen tNullException' occurred[/color][/color]
      in[color=blue][color=green]
      > > system.windows. forms.dll
      > >
      > > Additional information: Value cannot be null.
      > >
      > >
      > > Any ideas? The .cur reference is matching case and the .cur is in the
      > > project.
      > >
      > > Thanks
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Grant Richins [MS]

        #4
        Re: cursor Resources elp

        I believe you're mis-using that constructor. Have you read the docs for
        this overload? The first argument is not the containing type, but should be
        the type of the resource. My best guess is that you should change it to
        something like:
        new Cursor( typeof(Cursor), GetType().Names pace + ".cursorname.cu r");

        --
        --Grant
        This posting is provided "AS IS" with no warranties, and confers no rights.


        <discussion@dis cussion.microso ft.com> wrote in message
        news:uNrFq7$sDH A.3496@TK2MSFTN GP11.phx.gbl...[color=blue]
        > Hi,
        >
        > I have a user control and i have added .cur cursor files to the project
        > and trying to set .Cursor to new Cursor(gettype( ), "cursorname.cur "); and[/color]
        I[color=blue]
        > am getting
        >
        > An unhandled exception of type 'System.Argumen tNullException' occurred in
        > system.windows. forms.dll
        >
        > Additional information: Value cannot be null.
        >
        >
        > Any ideas? The .cur reference is matching case and the .cur is in the
        > project.
        >
        > Thanks
        >
        >[/color]


        Comment

        Working...