Roger,
I am using a dcbrowse to handle my customer calls (problem logs,support,etc) and have an add button. When I add a new log and close this MODAL window, the main dcbrowse App ends up behind other folders or open desktop programs instead of in front where it was before. I do not do anything different than used in all my customer apps. If I do a DC_ReadGuiEvent(DCGUI_EXIT_ok) then it works ok, but I prefer not to use that> Driving me batty, but its a short trip.
I have used all the set focuses i know of and work in my menu driven apps.
I am using windows 7, but it does the same thing on XP.
Thanks
Fred
Omni
DC Browse as Main app
Re: DC Browse as Main app
As an additional note, the MODAL also does not work when another window is open, including the ADD window. I feel it has something to do with using the DC_browse in the main app instead of using a standard window with various gets,etc. The getoptions and dcread gui are exactly the same.
Fred
Fred
Re: DC Browse as Main app
I suspect that you are not using the SETAPPWINDOW clause on your main window.
The eXpress train is coming - and it has more cars.
Re: DC Browse as Main app
No, It does not appear that simple. I wish it were.
Here is my gui read and getoptions. Same as my log entry program that is stand alone, standard data entry with buttons and those buttons do modal properly and go back to the main app properly.
DCGETOPTIONS NORESIZE ;
COLOR &QQONE sayrightbottom ;
TOOLTIPCOLOR GRA_CLR_BLACK, GRA_CLR_YELLOW ;
DCREAD GUI FIT TITLE 'Open Logs' ;
OPTIONS GetOptions ;
setfocus @oscan ;
PARENT @oDialog ;
setappwindow to lstatus;
Nodestroy ;
Maybe this will help.
thanks
Fred
Here is my gui read and getoptions. Same as my log entry program that is stand alone, standard data entry with buttons and those buttons do modal properly and go back to the main app properly.
DCGETOPTIONS NORESIZE ;
COLOR &QQONE sayrightbottom ;
TOOLTIPCOLOR GRA_CLR_BLACK, GRA_CLR_YELLOW ;
DCREAD GUI FIT TITLE 'Open Logs' ;
OPTIONS GetOptions ;
setfocus @oscan ;
PARENT @oDialog ;
setappwindow to lstatus;
Nodestroy ;
Maybe this will help.
thanks
Fred
Re: DC Browse as Main app
Are you saying that when you open a MODAL window from the main window, that the main window goes behind the other windows?
The eXpress train is coming - and it has more cars.
Re: DC Browse as Main app
setappwindow to lstatus;
Appears to be used incorrectly
Appears to be used incorrectly
Re: DC Browse as Main app
Yes, the modal does not work at all, which causes all sort of problems. I have 5 buttons and they all work the wrong way. The window can end up anywhere (non modal) and everytime the window is closed the main app window has to be found, as we have many items open on the desktop. Even though it is in front when the button is clicked, it get behind other windows on the desktop when the 2nd window is closed.
Fred
Fred
Re: DC Browse as Main app
It really sounds like your main window is not the SetAppWindow(), otherwise Modal should work.
Put this in your code just before the DCREAD GUI in your modal window procedure:
WTF SetAppWindow():title
This should give you the title of your main window.
If it doesn't then something is changing your SetAppwindow().
Put this in your code just before the DCREAD GUI in your modal window procedure:
WTF SetAppWindow():title
This should give you the title of your main window.
If it doesn't then something is changing your SetAppwindow().
The eXpress train is coming - and it has more cars.
Re: DC Browse as Main app
Roger,
It appears that the modal works for a while, but after a button is selected going to one of the other larger windows, then it eventually loses the setappwindow attribute.
As a note, these larger windows also have setappwindow and at least one or more buttons to do other functions that are modal.
We have had to make almost all our windows setappwindpw that have any validations or child windows under them in order for the modal commands to work, or for error messages be tied to the window and not get lost on the desktop.
Is there a command to ensure the setappwindow attribute is 'reset' for the window, other than resetting (destroy the dialog and loop) the window completely?
Fred
It appears that the modal works for a while, but after a button is selected going to one of the other larger windows, then it eventually loses the setappwindow attribute.
As a note, these larger windows also have setappwindow and at least one or more buttons to do other functions that are modal.
We have had to make almost all our windows setappwindpw that have any validations or child windows under them in order for the modal commands to work, or for error messages be tied to the window and not get lost on the desktop.
Is there a command to ensure the setappwindow attribute is 'reset' for the window, other than resetting (destroy the dialog and loop) the window completely?
Fred
Re: DC Browse as Main app
Use the function SetAppWindow( oMainWindow )
The eXpress train is coming - and it has more cars.