Changing the cursor programmatically

Hello,

can anyone tell me how I can set my cursor in the code with a relative path to my .cur

tnx in advance,
kimme


Answer this question

Changing the cursor programmatically

  • Jack He

    When I try that I get the following error:

    Absolute path information is required.

    My cursor1.cur is in the same directory where my application.exe is

  • nikkitan

    Yes, for now the path is still absolute and this works, but I would like to change this.

    this.ImageMap.Cursor = new System.Windows.Input.Cursor(@"E:\Visual Studio 2005\TestApplications\TrackingApplication\TrackingApplication\bin\Debug\cursor1.cur");


  • Carnage_bz

    I wrote that sample rather hastily, did you specify an absolute path Thanks.

  • Joe W

    button.Cursor = new Cursor("foo.cur");

    Note that we only support cursor files on the file system, not pack: or http:.



  • Changing the cursor programmatically