Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Centering of Top Window after Resize

Status
Not open for further replies.

Scott24x7

Programmer
Jul 12, 2001
2,828
JP
Okay, here's a tricky one. (I think...) My primary desktop window is resizeable. Any window that happens to be open on the desktop at the time of the resize, however, does not move with the resize. I'd like to be able to use the command MOVE WINDOW (WONTOP()) TO CENTER, after a resize occurs, but can't figure out where this type of code should go. I've put it in the VALID and the WHEN of my foundation read, but that doesn't seem to have any effect. Can anyone help me with this?
Many thanks,
-Scott Payton
 
I cannot think in FP2.6, a function for above immediatly. May be something exists. But with time passed more in VFP, my sharpness is degrading in 2.6!

I believe, the FP window, dosnt fire any event along with desktop...your question. However, you can think of putting the same codes you suggested in your ENTERFIELD() function. This will solve your problem.. However the effect will take place when the user changes a field. Just staying not in any such field .. can be covered in the when event of read or in your refresh routines.

Hope this helps.
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
The command is
MOVE WINDOW xxxx CENTER
not
MOVE WINDOW xxxx TO CENTER David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Dave,
The TO clause is actually optional, and not the problem I'm having. (That would genereate a Syntax error, if that were the case...) The problem here is that after re-sizing my Desktop, if there is an active window, I would like to Center it. The problem (and, as Ramini suggested, there may be no solution), is that I can not find any Event to trigger after the resize. The only option then is to creat some CPU intensive DO LOOP to constantly check for a resize, and then center whatever the WONTOP() is. I was hoping someone might know some other trick I was not aware of.
My theory was that perhaps there was something inherent in the foundation read that I could use to either detect the resize, and then I could trap, and force the center. So, if anyone knows a way to accomplish this, I'm still seeking the solution.
Many thanks,
-Scott

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top