Announcement

Collapse
No announcement yet.

Problems with Windows 2000

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

  • Problems with Windows 2000

    Hello all!

    I've recently upgraded to Windows 2000 and I've noticed that many of my programs that were written in PowerBasic v3.5 for DOS aren't working. I haven't started to analyze reasons yet; but, is anyone familiar with know incompatibilities?

    Don Ewald
    mailto:[email protected][email protected]</A>
    Donnie Ewald
    [email protected]

  • #2
    I tested my own PB/DOS programs pretty extensively on Windows 2000, and they seem to perform exactly the way they did with Windows NT. That's not too surprising, since the 2000 console is very similar to the NT console.

    Can you be more specific? You say your programs "aren't working". Do they simply not start up, do they crash, do they not respond to mouse clicks...?

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    "Not my circus, not my monkeys."

    Comment


    • #3
      I have found mouse pointer disapear in graphic mode
      screen 12, does anyone know how to solve this problem?

      yang


      ------------------

      Comment


      • #4
        The mouse pointer works fine for me in SCREEN 12 in Win2K...
        Code:
        $link "PB35\EXAMPLE\MOUSUNIT.PBU"
        screen 12
        msSetMouse 1
        msCursorOn
        print "Hello"
        delay 10
        beep
        end
        If this does not work for you, then maybe we need to see your code

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Thank you Lance,

          I try to run your code and see the "Hello" only.

          Yang

          ------------------

          Comment


          • #6
            I've noticed that the mouse doesn't always work properly with DOS programs running under Windows 2000. It's not clear why this is, or if something can be done about it.

            ------------------
            Tom Hanlin
            PowerBASIC Staff

            Comment


            • #7
              It probably has to do with the Quick Edit mode, which defaults to On in Windows 2000 and Off in all previous versions of Windows. Windows 2000 assumes that you want to use the mouse for highlighting text (as if you had used the Window Menu's Edit/Mark option). You can use the console's Window Menu's Defaults item to change your system's default Quick Edit setting to Off.

              -- Eric

              ------------------
              Perfect Sync: Perfect Sync Development Tools
              Email: mailto:[email protected][email protected]</A>

              "Not my circus, not my monkeys."

              Comment


              • #8
                Hello all!

                Here is one of the short programs that I'm having trouble with:

                Code:
                DEFINT A-Z
                
                OPEN "dir.bat" FOR OUTPUT AS #1
                
                PRINT #1, "dir /a-d /b 5???_*.jpg > !.lst"
                PRINT #1, "dir /a-d /b 5???-?_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 6???_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 6???-?_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 7???_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 7???-?_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 8???_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 8???-?_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 9???_*.jpg >> !.lst"
                PRINT #1, "dir /a-d /b 9???-?_*.jpg >> !.lst"
                
                CLOSE #1
                SHELL "command.exe /c dir.bat"
                KILL "dir.bat"
                
                OPEN "!.lst" FOR INPUT AS #1
                OPEN "!.bat" FOR OUTPUT AS #2
                
                DO WHILE NOT EOF(1)
                  LINE INPUT #1, Check$
                  NewCheck$ = "19" + Check$
                  PRINT #2, "ren "; CHR$(34); Check$; CHR$(34); " "; CHR$(34); NewCheck$; CHR$(34)
                LOOP
                
                CLEAR
                CLOSE
                KILL "!.lst"
                END
                ...quite simply it takes every file specified, adds a prefix of "19" and renames the file.

                Any ideas?

                Don Ewald
                [email protected]
                Donnie Ewald
                [email protected]

                Comment


                • #9
                  I have tried Eric's method but it is still not ok.

                  Yang

                  ------------------

                  Comment


                  • #10
                    The problem is COMMAND.EXE does not exist, so nothing happens! In non-NT versions of Windows and MSDOS, this file is usually called COMMAND.COM, and NT/2000 calls it CMD.EXE but also provides a copy of COMMAND.COM for compatibility!

                    Therefore, change your code from COMMAND.EXE to CMD.EXE (or COMMAND.COM as appropriate), and you will be fine most of the time.

                    However, if you want your app to run on any PC regardless of the version or brand of DOS that is running, then then the command interpreter could be named something else altogether. Therefore, you should query the COMSPEC environment variable to give you the correct name and path.

                    That said, you do not need to launch a command interpreter to launch BAT files (or EXE, COM, etc) at all... just run a batch file directly.

                    However, with regard to the above code, there is another conflict that is also stopping the code from working... the batch file name DIR.BAT conflicts with the DIR command. The solution is to change the batch file name to a more unique name. A subtle conflict such as this may work fine in Windows 9x, but Windows 2000 and Windows NT are not as forgiving!

                    Finally, the following code should solve all of these issues... change it to suit your own preferences:
                    Code:
                    OPEN "XDIR.BAT" FOR OUTPUT AS #1
                    PRINT #1, "DIR /a-d /b 5???_*.jpg > !.lst"
                    '...
                    CLOSE #1
                     
                    [b]' Now run the batch file:[/b]
                    SHELL ENVIRON$("COMSPEC") + " /c XDIR.BAT"
                    [b]' or we can drop the COMSPEC part altogether...[/b]
                    SHELL "XDIR.BAT"
                    ------------------
                    Lance
                    PowerBASIC Support
                    mailto:[email protected][email protected]</A>
                    Lance
                    mailto:[email protected]

                    Comment


                    • #11
                      Yang --

                      Can you be more specific about the problem(s) you are seeing?

                      -- Eric


                      ------------------
                      Perfect Sync: Perfect Sync Development Tools
                      Email: mailto:[email protected][email protected]</A>

                      "Not my circus, not my monkeys."

                      Comment


                      • #12
                        I have a PBDOS program running in VGA mode (screen 12), the mouse
                        pointer is normal in pure DOS (with mouse driver) and windows 9x,
                        but when I upgrade to windows 2000 the pointer is disapear.
                        Then I tried the code that Lance posted here and can only see the
                        text "Hello".
                        With my memory this situation had come in the windows nt but it
                        was gone after sp4.
                        Does anyone has such experience?


                        ------------------

                        Comment

                        Working...
                        X