Please provide an example file.
Looks like all the problems you are describing are a result of how you write your scripts.
But you have not provided a copy of the file so we can't see your scripts.
A. In windows, if the main (first window) is maximized, when you open the second window, this happens.
B. Is the first window of Type Document? What type of window is the second type? If you don't maximize the first window, but stretch it to fill the screen height & width, this won't happen. Then you won't have to use any scripts to resize it.
C & D are related to A & B.
But as Mr. Robertson said, all of this is fixable if you provide a copy of your DB.
Thanks for the reply Bruce!
I created a simple solution that illustrates my issues. When I was messing with the scripts I did notice why I am having a few of the issues with the windows on my Customers Solution, but NOT all of them. The biggest thing is the main window (Called AcceessPanel in my example solution attached) needs to stay maximized and it does not. Trying to adjust it's size with the other windows open is where a lot of my problems are coming from, whether through a script or user interaction. Also adjusting the size of the AccessPanel window while the floating window is open causes the the floating window to change size when it's subsquently moved by the user.
Let me know if there is anything I can do about this. Also is there a way to control the closing of windows?
WindowsTestDB.fmp12.zip 58.9 K
I updates the file I attached, I found another window issue with it! I have tried to stretch it to fit screen, that's when it only worked some of the time! All windows with the exception of the floating document window are Type Document. So I basically cannot have the first window maximized if I want it not to change size, right?
Is there a way to lock the main window so it cannot be moved or closed by the x in the far right corner?
No, you cannot leave the first window maximized. This is a function of the way application windows work in the Windows environment. You can compensate somewhat by determining the maximum size of the application window and setting the window size to that (allowing room for title bar and scroll bars), but Windows will automatically set the windows to Restore size as soon as you have more than one.
To your second question, to trap the close gadget, there are a couple of methods:
1) The "quick and dirty" trick is to use an OnLayoutExit trigger. If you set an Exit Script script step with a False exit condition, then the triggering action is stopped. You can use this to prevent a window from being closed unless some other condition(s) is / are met.
2) A slightly more sophisticated technique involves opening a second window that substitutes for the main window and eliminates the close gadget altogether. In order to do this, you need to process a series of steps in your opening script:
- Rename the main window to something other than the name of the file.
- Spawn a second window that has no close gadget (using the appropriate settings).
- Rename the second window to the name of the file.
- Close the first window.
By doing this, you will be basically replacing the original window with a new one of the same name, but without the close gadget.
Thanks Mike! I actaully have all the issues sorted out. I really appreciate the help