Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form resizing.
Message
From
12/02/2002 11:48:23
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00618894
Message ID:
00618899
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Hello, in a new application I'm putting a form (for navigation) on the left side of my VFP desktop. When the program starts up the form automatically resizes itself to cover the entire left side of the screen.
>
>My question is this: How can I tell when the _screen resizes?
>
>One idea I had is to put a maximized form with AlwaysOnBottom = .T., WindowState=2, and TitleBar = 0. That way when it resizes from being maximized I can handle all my resizing. But before I do this way what is the common way to do this?
>
>Thank you,
>Bryan

Bryan,

Here's something I piced up from the ng.
*
* ScreenMethods.PRG
*
* Fred Taylor - ElZorro 4/10/2001  www.elzorro.org
*
* Use the following to modify _SCREEN methods:
*
* For VFP6 & 7:
*
*     _SCREEN.NewObject("oSH","ScreenHook","screenmethods.prg")
*
* For VFP3 & 5:
*
*     SET PROCEDURE TO screenmethods ADDITIVE
*     _SCREEN.AddObject("oSH","ScreenHook")
*
* Any of the main VFP screen methods can be hooked into in this manner.
*
DEFINE CLASS ScreenHook AS CUSTOM
oScr = _SCREEN
PROCEDURE oScr.Resize()
  *
  * Code to handle the main VFP screen being resized
  *
  WAIT WINDOW NOWAIT TRANSFORM(this.Width)+" "+TRANSFORM(this.Height)
ENDPROC
PROCEDURE oScr.RightClick
  *
  * Code to do a "shortcut" menu on main VFP screen RightClick
  *
  DO testmenu.mpr
ENDPROC
*
* Custom methods work, too.
*
PROCEDURE oScr.MyMethod
wait window "my method fired!"
ENDPROC
ENDDEFINE
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform