Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Minimizar e Maximizar
Message
From
11/11/2003 07:44:46
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
 
To
11/11/2003 05:36:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00848626
Message ID:
00848646
Views:
12
Olá Edson!

>Eu já havia pensado nisto, mas, em um form funciona bem, o problema é que preciso desta funcionalidade na tela principal da aplicação, e quando minimizo a aplicação (não um form da aplicação) o VFP não dispara o evento resize do objeto _SCREEN. Mais alguma sugestão?

No help do VFP 8 tem o exemplo, acho que ele pode resolver o seu problema [dê uma olhada na função BindEvent (como mencionado pelo Fernando)]. Abaixo o exemplo citado (não cheguei a fazer teste):
The following example demonstrates how to hook into _SCREEN methods.
*
* 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.moved()
  *
  * Code to handle the main VFP screen being resized
  *
  WAIT WINDOW NOWAIT "moved"
 ENDPROC
 PROCEDURE oScr.RIGHTCLICK
  *
  * Code to do a "shortcut" menu on main VFP screen RightClick
  *
  * DO ..\menus\testmenu.mpr
 ENDPROC
 *
 * Custom methods work, too.
 *
 PROCEDURE oScr.MyMethod
  WAIT WINDOW "my method fired!"
 ENDPROC
ENDDEFINE
Até mais.
Erick
Força Sempre!
Strength Always!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform