Take screen capture without cursor

For screen capture i use CGDisplayCreateImage. But in output image i see cursor. How i can take screen capture without cursor?

Why can't you hide the cursor temporarily? You can use the +[NSCursor hide] method, or the +[NSCursor setHiddenUntilMouseMoves] or the CGDisplayHideCursor function.


Or are you asking about the text editing cursor inside a text field or view?

If you hide it, be sure to turn it back on...


CGDisplayHideCursor(kCGDirectMainDisplay);
CGImageRef image = CGDisplayCreateImage(kCGDirectMainDisplay);
CGDisplayShowCursor(kCGDirectMainDisplay);
Take screen capture without cursor
 
 
Q