If you want to record the size of your window in a file and then restore it when it loads back up, and you have used the client coordinates flag, it won't work. Your window gets bigger every time. Makes no difference whether you use GadgetWidth() or ClientWidth() to record the last size, it still does it.