Announcement

Collapse
No announcement yet.

No Mouse-Up on Win Server 2016

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

  • No Mouse-Up on Win Server 2016

    I have a console program that has been running for some time on multiple operating systems. A client just asked for it for it to be tested on the Win Server 2016 OS. What I noticed right away is that I cannot control the application with the mouse, as was available in the past. So I wrote a small program to test this very specific issue. If anyone has access to a Win Server 2016 box, can you please compile this with PBCC 6.04 and let me know the results? When you run it and press the Enter key, the console app should end. Same behavior should take place when pressing and then releasing the left mouse button. However for me, this mouse activity only causes a full cursor to be displayed. This sample program works fine on Win 7 and Win Server 2008 (all 64-bit machines and OS).


    Code:
    #COMPILE EXE
    #DIM ALL
    
    FUNCTION PBMAIN () AS LONG
    
        LOCAL cKey AS STRING
    
        CON.MOUSE(8,1)
        CON.MOUSE.ON
        CON.WAITKEY$("",0 ) TO cKey
    
    END FUNCTION

  • #2
    I know you're looking for 2016 but I tried it on 2012 R2 and it works as you described, Enter and left mouse button end program. Sorry I don't have 2016.

    Comment


    • #3
      Thanks for checking Frank. All other mouse activity (GUI programs) works fine. I checked the mouse settings and they are all pretty typical and certainly not modified from a fresh install, which was only a few days ago.

      Comment


      • #4
        Okay, I discovered the problem. It appears as though Win Server 2016 has "Quick Edit Mode" for console applications enabled by default, where-as prior Windows operating system versions had it disabled. Quick Edit Mode, if you don't know, allows you to highlight text in a console application using the left mouse button, and preventing those mouse button activities from flowing through to my console application.

        You can run CMD and right-click on the title-bar to get the properties and de-select this option.

        Click image for larger version

Name:	QuickEditMode.PNG
Views:	5
Size:	26.6 KB
ID:	776406

        In Win Server 2016 at least, you need to close the console and re-launch it, I believe, in order for this setting change to take effect. Once you do, the little test program above behaves as expected. I have not determined exactly how to rectify this for production but I will report back again once I do. At least I now know what the heck was preventing left-mouse clicks from registering in my program. Yeah!

        Comment


        • #5
          Also, I just discovered docs indicating that Quick Edit Mode is ON by default in Win 10, so I suspect a number of folks looking for mouse clicks in console applications have already run into this.

          Comment

          Working...
          X