DC Browse as Main app

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

DC Browse as Main app

#1 Post by omni »

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

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: DC Browse as Main app

#2 Post by omni »

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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC Browse as Main app

#3 Post by rdonnay »

I suspect that you are not using the SETAPPWINDOW clause on your main window.
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: DC Browse as Main app

#4 Post by omni »

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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC Browse as Main app

#5 Post by rdonnay »

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.

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: DC Browse as Main app

#6 Post by RDalzell »

setappwindow to lstatus;

Appears to be used incorrectly

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: DC Browse as Main app

#7 Post by omni »

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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC Browse as Main app

#8 Post by rdonnay »

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().
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: DC Browse as Main app

#9 Post by omni »

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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC Browse as Main app

#10 Post by rdonnay »

Use the function SetAppWindow( oMainWindow )
The eXpress train is coming - and it has more cars.

Post Reply