Answers for "python how to check if cursor is hidden"

0

python how to check if cursor is hidden

import win32gui # pip install win32gui

def get_cursor_flag():
  #Get the cursor flag (visibility)
  flag, hcursor, (x, y) = win32gui.GetCursorInfo()
  return flag

def run(flags):
  if flags == 0:
    # Cursor currently hidden
  elif flags == 1:
    # Cursor currently visible
  else:
    # Should not happen

cursor_flag = get_cursor_flag()
run(cursor_flag)
Posted by: Guest on January-09-2021

Code answers related to "python how to check if cursor is hidden"

Python Answers by Framework

Browse Popular Code Answers by Language