[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 487
  • Last Modified:

Ability to Move Screens ala Windows 7

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?
0
fmoore0001
Asked:
fmoore0001
  • 3
  • 2
1 Solution
 
Olaf DoschkeSoftware DeveloperCommented:
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.
0
 
fmoore0001Author Commented:
Olaf,

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.

Frank
0
 
fmoore0001Author Commented:
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
Move

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.

Frank
0
 
Olaf DoschkeSoftware DeveloperCommented:
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")
o.Show(1)

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
         Endif
      Endwith
   Endproc

   Procedure Init()
      Bindevent(This,"Resize",This,"Resize_Reaction",4)
   Endproc
Enddefine

Open in new window


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

Bye, Olaf.
0
 
fmoore0001Author Commented:
Thanks OIaf.

Frank
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now