John, The AutoCenter property doesn't only work when the form is initially displayed. You can see this if you put the following in the Resize() event of the form:
This.AutoCenter=.T. The form will (most times) autocenter itself after the resize. The unfortunate effect is that you get a form "ghosting" on the screen during the resize. Also if you Maximize the form and then immediately minimize it then the form will become centered again so I guess you could use this feature in some way. Off the top of my head I'd try finishing the resize then toggle the windowstate to recentre the form. The trouble I can see is that you have no way of knowing when you have finished the resize method - ideally need to bind the MouseUp event to the "end of resize" event and I can't think of any way at present. I haven't got a PC here at the moment with VFP on it to try though. Let us know how you go on and I'll give it a look later on. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John J. Mihaljevic Sent: 18 December 2007 14:29 To: [email protected] Subject: Auto-recentering forms when main window is resized Hi all, I see that the AutoCenter property makes a form display in the center of the screen when it's first displayed, but is there a simple way to have a form automatically recenter itself when the main VFP window is resized? I'm sure I could set something up to determine the size of the form, the size of the window, and move the form, etc., but before I do all that I thought I'd ask if I'm overlooking something simple first. Thanks! [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

