Example of using Resize event