# Problems with cursor()

**URL:** <https://discourse.processing.org/t/problems-with-cursor/27584>\
**Category:** Beginners\
**Created:** [February 4, 2021, 2:05pm UTC](https://discourse.processing.org/t/problems-with-cursor/27584 "2021-02-04T14:05:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)\
**Post date:** [February 4, 2021, 2:05pm UTC](https://discourse.processing.org/t/problems-with-cursor/27584/1 "2021-02-04T14:05:56Z")

</div>

Hi, I have a little project and i am trying to change the normal cursor with an image and it works for a little while, however after 1 minute it stops working (the cursor just changes back to the arrow and won’t change anymore).  
Here is the code:

```auto
void mus(){
  if(mouseX<=grid[1][1].moveMINX && mouseY<=grid[1][1].moveMINY){ // upper left
    
    cursor(venstreop,0,0);
    
  }else if(mouseX<=grid[1][1].moveMINX && mouseY>grid[1][1].moveMINY && mouseY<grid[1][1].moveMAXY){ // left
    cursor(venstre,0,venstre.height/2);
    
    
  }else if(mouseX<=grid[1][1].moveMINX && grid[1][1].moveMAXY<=mouseY){ // lower left
    cursor(venstrened,0,venstrened.height);

    
  }else if(grid[1][1].moveMINX<mouseX && grid[1][1].moveMAXY<=mouseY && mouseX<grid[1][1].moveMAXX){// down
    cursor(ned,ned.width/2,ned.height-2);
    
  }else if (grid[1][1].moveMAXX<=mouseX && grid[1][1].moveMAXY<=mouseY){ // lower right
    cursor(hojrened,hojrened.width,hojrened.height);
    
  }else if (grid[1][1].moveMAXX<=mouseX && grid[1][1].moveMINY<mouseY && mouseY<grid[1][1].moveMAXY){ // right
    cursor(hojre,hojre.width,hojre.height/2);
    
  }else if (grid[1][1].moveMAXX<=mouseX && mouseY<=grid[1][1].moveMINY){ // upper right
    cursor(hojreop,hojreop.width,0);

    
  }else if (grid[1][1].moveMINX<mouseX && mouseX<grid[1][1].moveMAXX && mouseY<=grid[1][1].moveMINY){ //up 
    cursor(op,(op.width)/2, 0); 
  }else { //midten 
    cursor(CROSS);
  }
}

```

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [February 4, 2021, 5:35pm UTC](https://discourse.processing.org/t/problems-with-cursor/27584/2 "2021-02-04T17:35:45Z")

</div>

if it doesn’t work just create it in a simple way. Use `noCursor();`  
After it just use `image(PImage,mouseX,mouseY);`

---

<div class="post-metadata">

**Author:** ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)\
**Post date:** [February 6, 2021, 12:27am UTC](https://discourse.processing.org/t/problems-with-cursor/27584/3 "2021-02-06T00:27:30Z")

</div>

Thank you for the help. This was the way I ended up doing it 😉
