Yes—we have painted the vinyl windows and door frames at our own premises. Clean and degrease thoroughly, then paint straight from the can in thin coats.
Keep paint off the black glazing seal, as the oil will eat into it. Maintenance cycles on vinyl differ from timber, because the paint does not absorb into the surface.