Announcement

Collapse
No announcement yet.

PB 8 behaviour

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB 8 behaviour

    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.

    BOB MECHLER

  • #2
    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
    Bob Mechler

    Comment


    • #3
      What about %SW_RESTORE?
      Adam Drake
      PowerBASIC

      Comment


      • #4
        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

        Comment


        • #5
          Found my error. Not a problem with PB 8.

          Bob Mechler

          Comment


          • #6
            Inquiring Minds would like to know?


            Could save someone else with similar problems
            Engineer's Motto: If it aint broke take it apart and fix it

            "If at 1st you don't succeed... call it version 1.0"

            "Half of Programming is coding"....."The other 90% is DEBUGGING"

            "Document my code????" .... "WHYYY??? do you think they call it CODE? "

            Comment


            • #7
              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.

              Bob Mechler

              Comment


              • #8
                "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

                Ahhhhhh...the life of programming.....
                Engineer's Motto: If it aint broke take it apart and fix it

                "If at 1st you don't succeed... call it version 1.0"

                "Half of Programming is coding"....."The other 90% is DEBUGGING"

                "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                Comment

                Working...
                X