InOverMyHead
Technical User
I just changed an program so that it no longer loads in the foxpro window, it now loads into the main switchboard window which I have set SHOWWINDOW = 2 and the remaining forms to SHOWWINDOW = 1. I call these forms from the switchboard form and have added _screen.visible=.F. and READ EVENTS to the MAIN program, which in turn calls up the switchboard.
Everything works fine - except - I have three forms that make use of User Defined Browse windows. With the removal of the vfp window these browse windows no longer appear. I did not code these and know nothing of how they work.
I've spent the better part of the day researching and trying what made sense to me but with no aviail.
Am I correct in that somehow I set the SHOWWINDOW value in this user defined window to 1?
Any help would be most greatly appreciated.
CODE FROM BROWSE BUTTON THAT LAUNCHES BROWSE WINDOW:
*(This reflects changes I have made to IN WINDOW from it's *previous setting of IN WINDOW SCREEN to IN WINDOW *frmAddCat. frmAddCat is the name of the form that appears *in the top level window in which I need to browse to *appear. I also added the wndCmdBrowse.showwindow = 1.)
LOCAL lcMaintable, lnSelect, lcKey, lcUseAgain, lcOnError, lcOnEnter
lnSelect = SELECT()
lcMainTable = Thisform.DataEnvironment.Maintable.Alias
SELECT (lcMainTable)
lcKey = catname
lcUseAgain = pcAutoDataDirectory + "addcat"
USE (lcUseAgain) AGAIN IN 0 ALIAS brwAddcat ORDER catname
SELECT brwAddcat
LOCATE FOR catname = lcKey
IF (!FOUND())
LOCATE FOR .T.
ENDIF
DEFINE WINDOW wndAddcatBrowse ;
AT 1, 1 ;
SIZE 20, 20 ;
IN WINDOW frmAddcat ;
NAME wndCmdBrowse ;
FONT "Arial", 9 ;
DOUBLE ;
NOCLOSE NOFLOAT NOGROW NOMDI NOMINIMIZE NOZOOM
lcOnError = ON("ERROR"
ON ERROR POP KEY ALL
lcOnEnter = ON("ENTER"
ON KEY LABEL ENTER KEYBOARD ;
IIF(WEXIST("Find", "{ENTER}", "{CTRL+W}" PLAIN CLEAR
wndCmdBrowse.showwindow = 1
wndCmdBrowse.WindowState = 2
wndCmdBrowse.Show()
BROWSE NORMAL NOEDIT NOAPPEND NODELETE NOMENU ;
TITLE "Categories" ;
WINDOW cmdAddcatBrowse
wndCmdBrowse.Release()
ON KEY LABEL ENTER &lcOnEnter
ON ERROR &lcOnError
IF (LASTKEY() = 27)
* User pressed ESCAPE
* Leave value of lcKey alone - return use to pre-Browse record
ELSE
lcKey = brwAddcat.catname
ENDIF
USE IN brwAddcat
SELECT (lcMaintable)
LOCATE FOR catname = lcKey
Thisform.ShowGets()
SELECT(lnSelect)
Everything works fine - except - I have three forms that make use of User Defined Browse windows. With the removal of the vfp window these browse windows no longer appear. I did not code these and know nothing of how they work.
I've spent the better part of the day researching and trying what made sense to me but with no aviail.
Am I correct in that somehow I set the SHOWWINDOW value in this user defined window to 1?
Any help would be most greatly appreciated.
CODE FROM BROWSE BUTTON THAT LAUNCHES BROWSE WINDOW:
*(This reflects changes I have made to IN WINDOW from it's *previous setting of IN WINDOW SCREEN to IN WINDOW *frmAddCat. frmAddCat is the name of the form that appears *in the top level window in which I need to browse to *appear. I also added the wndCmdBrowse.showwindow = 1.)
LOCAL lcMaintable, lnSelect, lcKey, lcUseAgain, lcOnError, lcOnEnter
lnSelect = SELECT()
lcMainTable = Thisform.DataEnvironment.Maintable.Alias
SELECT (lcMainTable)
lcKey = catname
lcUseAgain = pcAutoDataDirectory + "addcat"
USE (lcUseAgain) AGAIN IN 0 ALIAS brwAddcat ORDER catname
SELECT brwAddcat
LOCATE FOR catname = lcKey
IF (!FOUND())
LOCATE FOR .T.
ENDIF
DEFINE WINDOW wndAddcatBrowse ;
AT 1, 1 ;
SIZE 20, 20 ;
IN WINDOW frmAddcat ;
NAME wndCmdBrowse ;
FONT "Arial", 9 ;
DOUBLE ;
NOCLOSE NOFLOAT NOGROW NOMDI NOMINIMIZE NOZOOM
lcOnError = ON("ERROR"
ON ERROR POP KEY ALL
lcOnEnter = ON("ENTER"
ON KEY LABEL ENTER KEYBOARD ;
IIF(WEXIST("Find", "{ENTER}", "{CTRL+W}" PLAIN CLEAR
wndCmdBrowse.showwindow = 1
wndCmdBrowse.WindowState = 2
wndCmdBrowse.Show()
BROWSE NORMAL NOEDIT NOAPPEND NODELETE NOMENU ;
TITLE "Categories" ;
WINDOW cmdAddcatBrowse
wndCmdBrowse.Release()
ON KEY LABEL ENTER &lcOnEnter
ON ERROR &lcOnError
IF (LASTKEY() = 27)
* User pressed ESCAPE
* Leave value of lcKey alone - return use to pre-Browse record
ELSE
lcKey = brwAddcat.catname
ENDIF
USE IN brwAddcat
SELECT (lcMaintable)
LOCATE FOR catname = lcKey
Thisform.ShowGets()
SELECT(lnSelect)