With the a little help of OpenCV and Python you can do this very easy:
cap = cv2.VideoCapture(1) # my webcam
cap.set(3, 1280) # set the resolution
cap.set(4, 720)
cap.set(cv2.CAP_PROP_AUTOFOCUS, 0) # turn the autofocus off
I use OpenCV 3.1.0-dev, Python 2.7.5 and the Logitech HD Pro Webcam C920