Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BROWSE Window in VFP5
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00160347
Message ID:
00160454
Views:
19
>I have a Browse Records cmd button on a form in an application I am developing. The idea, of course, is to pop up a quick Browse window for the user if the user clicks on said cmd button. Is there any way I can use a BROWSE window within a compiled VFP5 program and still SCREEN=OFF in my Config.fpw? Any help would definitely be appreciated. Thanks, CWH.

I am working on a 2.6 to 5.0 conversion. We have an osdi (toplevelform) so we do not use the _screen. We converted some browses to grids and kept many browses. Converting browses to grids is not a simple thing. I have spent more time on grids than the entire rest of the project. Of course if your grids are readonly they would be much easier.

For our grids we use a template. the following is an example of a browse template called otemplatewin. using the "window" clause of the browse allows you to use may more properties. It seems that is you use the "normal" clause of the browse that it can overide some of these properties (like minbutton). I do not use the "normal" clause. Be sure to use for form.name that you want in the "in window" clause. we usually only have a toplevelform, because we use pageframes. but occassionally when we have a input form with a browse, we use that form.name uin the "in window".

***************************************************************
*** Window Template for the browse windows
*** example code
*** Browse NOEDIT NODELETE NOAPPEND Window TemplateWin in window apptoplevelform
***
*** example of "in window" should be adapted to the form.name that the
*** browse is to be displayed.
***************************************************************

vosdi_top = 125 && initial offset for otemplatewin from the toplevelform top
vosdi_left = 15 && initial offset for otemplatewin from the toplevelform left
* top and left will be adjusted in toplevelform moved and resize method code

Define Window TemplateWin From 0,0 size 3,10 System Name oTemplateWin

With oTemplateWin
.Width=742
.Height=332
.borderstyle=3
.caption="[ENTER] or [RightMouse] to SELECT - [ESC] to CANCEL"
.FontName="Arial"
.fontsize=8
.controlbox=.f.
.movable=.t.
.closable=.t.
.minbutton=.t.
.maxbutton=.t.
.windowtype=1
EndWith

* in the apptoplevelform.resize and move add the following code. this will
* keep your browse window at the correct position even if the toplevelform
* is resized or moved. or course this is not needed if you do not allow the
* client to move or resize the toplevelform.

With oTemplateWin
.top=thisform.top + vosdi_top
.left=thisform.left + vosdi_left
EndWith
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform