Ability to Move Screens ala Windows 7

Posted on 2011-05-02
Last Modified: 2012-05-11
In most programs under Windows 7 I can Click and Hold in the center of the Title bar and move the application anywhere on my two screens, even if the application is maximized.  I cannot do this with Foxpro applications- I must unclick the maximize, then move.  Does someone have a trick to make Foxpro apps work the same way?
Question by:fmoore0001
    LVL 29

    Expert Comment

    by:Olaf Doschke
    I'm not at Windows 7, but I wonder why that should be different. Foxpro is 32bit and Winforms, but then Office32 bit also is.

    Despite of that, if maximising also fixes the window, then don't allow maximising, instead use an _assign method to revert to the normal window modus with width and height of the screen and you have the same size and position without the fixed position. To determine screen size there is the sysmetric() function, Top/Left should be 0 or left should be screen width of the left screen to position on the right screen.

    bindevent to the _screen.windowstate property, if it's the screen you want to prevent to go into maximised state.

    Bye, Olaf.

    Author Comment


    Not quite the problem.  In Windows 7 if you click on the Title bar and pull, even in a maximized program, the screen goes to normal and allows you to move it, abit it stays in Normal, really handy if you are moving to your second screen.

    Why Foxpro does not do the same I cannot answer.  I have a 1995 Omnis program that allows this movement just fine.  But not 2006 Foxpro 9.2.  I was hoping some simple setup in Foxpro.


    Author Comment

    Hmmmm. In Foxpro, full screen, in Windows 7,  If you double click on the Title bar of course you can move it then, but the procedure is:

    Double click
    Single click and hold

    Whereas on any other program in Windows 7 you single click and hold on the Title bar, it goes to Normal size and can be moved around so long as you hold the click.

    Just bugs me I can't do this with Foxpro.  It is kinda handy when you have two or more screens.

    LVL 29

    Accepted Solution

    I completely understand what you want. First I doubt you can do aynthing about it with a setting. Foxpro Forms are Window Forms and in general should support all OS behaviour, The border area including title bas is not foxpro, it's windows handling the windows, foxpro only gives you some proeprties like the caption, etc.

    So if foxpro forms or foxpro itself does not work like other windows in win7 there's something internal going on you can't do anything about.

    Therefor I suggested to simply disallow maximised state via _assign method, that is WindowState_Assign. If you receive a value 2 (maximised there) you simply stay with the form size, but put the state right back to normal (0). That's the idea. That is the form does get maximised, but afterwards will have normal state and therefore is moveable without the double click.

    Testing this I see WindowState_Assign is never occurring. But there is Bindevent(), this is a starter, it will always put a form on the left screen, though, via .Left=0:
    o = Createobject("movableform")
    Define Class movableform As Form
       Desktop = .T.
       Procedure Resize_Reaction()
          With This
             If .WindowState = 2 && maximised
                * Put the window back to normal state
                .WindowState = 0 && normal
                * But keep the maximised state
                .Top = 0
                .Left = 0 && needs to be changed to position within the current monitor.
                .Width = Sysmetric(21) && maximised window width
                .Height = Sysmetric(22) && maximised window height
       Procedure Init()

    Open in new window

    It's an idea, it's not perfect.

    Bye, Olaf.

    Author Closing Comment

    Thanks OIaf.


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: (http://msd…
    OfficeMate Freezes on login or does not load after login credentials are input.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now