You're forgetting 'break' in your switch/case so 'Windowed' always gets set to true, and 'case 2' does the exact thing 'default' does; you could probably do it with 'if' instead but this is what the switch/case should look like:
switch (m) { case 1: Windowed = false; break; default: Windowed = true; }