Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to trap events from _screen
Message
From
02/09/2003 23:11:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00825529
Message ID:
00825534
Views:
13
I accidently sent this to myself [ :o) embarassed!)

I have this code as the main.prg. This is just a test app.

SET DATE DMY
SET EXCLUSIVE OFF
SET SYSMENU OFF
SET SYSMENU TO
SET SYSMENU AUTOMATIC
ON SHUTDOWN DO exiting
_SCREEN.Caption = "VFP Test APP"
ZOOM WINDOW SCREEN MAX
_Screen.ScrollBars = 2
bb=Browser() && sets up the _screen as a web browser
DO menu1.mpr
oScreen=""
DO myresizer && calls the resizer proc????
DO FORM main && This is the form that appears like a toolbar on the exterme left
READ EVENTS
QUIT
*******************
PROCEDURE Myresizer
_Screen.AddObject("oResizer", "Resizer")
DEFINE CLASS Resizer AS Custom
oScreen = _Screen
PROCEDURE oScreen.Resize
IF _screen.WindowState <> 1 && Main VFP Window isn't minimized
FOR i=1 TO _screen.FormCount
IF _screen.Forms(i).AutoCenter
_screen.Forms(i).AutoCenter = .F.
_screen.Forms(i).AutoCenter = .T.
ENDIF
ENDFOR
ENDIF
ENDPROC
ENDDEFINE



>Hi Bernard,
>
>The answer depends on what VFP version you're using. In VFP8 you can use BINDEVENTS() function. See Event Binding in VFP 8 at http://code-magazine.com/focus/Article.aspx?quickid=0301052.
>In the previous versions of VFP you can use a trick described in Re: Centering Forms Message #724998.
>
>>I have an app that runs as a MDI with a toolbar like form located at the extreme left of the MDI (_SCREEN). I need to be able to move this toolbar to keep it visible if the MDI Parent is resized.
>>
>>For this I need to be able to trap the resize event and maybe other events of the _SCREEN. Is this possible.
>>
>>If so could I please have some links to the info?
>>
>>Thanks
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform