You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
"Scope-Creep"....The killer of of any good program.
I hate when that happens. You code, your code-shway is strong. Someone comes in with a "Innocuous" feature (at the time), and hence the key word ("Scope-Creep") and somewhere down the line causes MAJOR headaches
I just had separate functionality that affected this program adversely. Whenever I have an error or other message popup over a running program I use a modeless smaller dialog instead of a messagebox. This way I can give it a minimize button. It was requested so a user could minimize the error box and then minimize the program screen to go on to something else while they were waiting for a service call. I was asked a while back to make it automatic that if they minimized the popup box to hide the main screen and then unhide the main screen if they clicked on the taskbar to bring the error message dialog back up. The IsIconic being true was keeping things from restoring to size with a %SW_NORMAL. %SW_MAXIMIZE kicked it enough to allow me to continue with a normal screen though.
Tried that too. The %SW_MAXIMIZE was the only thing that broke it loose from the taskbar.
Code:
DIALOG NEW 0,SYS$ + SQLVER$ + V_DATASET$,,,V_CHARSIZE * 82 + 3 ,(27 * V_ROWSIZE) + (V_ROWSIZE / 2) + 5, dialog_style&,0 TO hDlg&
'build menu etc
'
'
MENU ATTACH hMenu&, hDlg
IF MAXMIN$ = "1" THEN
DIALOG SHOW STATE hdlg&,%SW_MAXIMIZE
ELSEIF MAXMIN$ = "2" THEN
DIALOG SHOW STATE hdlg&,%SW_MINIMIZE
ELSE
'no change
END IF
DIALOG SHOW MODELESS hDlg&, CALL dlgproc
The MAXMIN variable is passed from the preceding program and is useful for long running multi program night processing type programs to run all minimized but if chosen individually to show at the proper size. If MAXMIN$ = "0" then the dialog shows a normal size.
I would have thought the size of the Dialog set in the Dialog New statement would be what the %SW_RESTORE would restore it too, but it does not. It seems if it is minimized prior to doing the Dialog Show Modeless then it gets stuck minimized without the %SW_MAXIMIZE statement. The only option at that point is Alt-F4 or right-clicking the taskbar and clicking close. If I happen to know the keystrokes to close the program and navigate all the way back through the menus and the login, they all are minimized. (I understand why that is though. It's a side effect of the MAXMIN setting being set for too long a period of time.) If I place the %SW_MINIMIZE after the DIALOG SHOW it flashes every time I move to a new program in the chain. We have one customer that runs 95 programs in a night processing scenario and all stay minimized until the job is done 8 hrs later. (Produces over 100 reports)
I finally created a flag that disabled the MAXMIN (Set it back to "0") in the program just prior to the one I want to return to normal size because the run at that point is over.
The 95 program run mentioned above, thankfully just terminates completely when it is done by design.
BOB MECHLER
Last edited by BOB MECHLER; 20 Jan 2008, 07:58 AM.
Reason: More info
This is the only way I could get it to be viewable again if the program was launched as %SW_MINMIZE. Just doing a DIALOG SET SIZE even with REDRAW wouldn't do it. Had to %SW_MAXIMIZE it first and then resize back to it's normal size.
Code:
DIALOG SHOW STATE hdlg&,%SW_MAXIMIZE
DIALOG SHOW STATE hdlg&,%SW_HIDE
DIALOG SET SIZE HDLG,V_CHARSIZE * 82 + 3 ,(27 * V_ROWSIZE) + (V_ROWSIZE / 2) + 5
DIALOG SHOW STATE hdlg&,%SW_SHOW
I have a set of programs that run one after the other. Since I moved to PB 8 and I minimize program 2 (runs about 2 hrs), when it goes to program 3 it stays minimized and you cannot restore it to normal with DIALOG SHOW STATE hdlg, %SW_SHOW or %SW_SHOWNORMAL OR even click on it icon on the taskbar. Anyone else encounter this. Doesn't occur in 7.04 using the same programs.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: