Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse in Top-level form

Status
Not open for further replies.

MarvinR

Programmer
Oct 29, 2001
37
HK
I call a simple browse command from a top-level form's menu (.MPR) and the browse window shows correctly over the top-level form, fine; but when this menu DO a form and then this form's method call a browse command, the browse window is showed on the foxpro system screen, not over the calling form within the top-level form.

And when I set Application.visible = .f., the browse window doesn't appear at all, what's wrong ?
 
The browse window is associated with the main screen and not the form, so when you hide the main screen the browse gets hidden too. I suggest you dive into grid controls instead, and place on of those on your form.

Dave S.
 
Hi,

You could try something like this.

_screen.visible=.T.
TopForm.visible=.F.
activate screen

browse

topform.visible=.T.
_screen.visible=.F.
activate window topform
Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Maybye this function helps you:

FUNCTION myBrowse
LParameters plUpdate, pcFields, pcOtherPar
private all like x*
plUpdate=iif(empty(plUpdate), .F., plUpdate)
IF RecCount() = 0
if plUpdate
append blank
else
RETURN .F.
endif
ENDIF
IF Eof()
go top
ENDIF
xcUpdate=iif(plUpdate, "", " NOMODIFY NOAPPEND NODELETE")
pcFields=iif(empty(pcFields), "", " FIELDS "+pcFields)
pcOtherPar=iif(empty(pcOtherPar), "", pcOtherPar)
IF .not.("FONT" $ Upper(pcOtherPar))
pcOtherPar=pcOtherPar+" font 'Courier New'"
ENDIF
WITH _SCREEN
xlScreen=.Visible
xnState=.WindowState
.Visible=.T.
.WindowState=2
define window xwBrowse from 0, 0 to int(SRows()), int(SCols()) ;
ZOOM GROW FLOAT CLOSE
keyboard "{CTRL-F10}" CLEAR
BROWSE window xwBrowse &pcFields. &xcUpdate. &pcOtherPar.
.Visible=xlScreen
.WindowState=xnState
ENDWITH

RETURN .T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top