frame effect, defined new functions resize and gran from desktop