Unintentional behavior of VS Application window