none
GETFOCUS AND LOSTFOCUS USING AN EXTENDED MONITOR RRS feed

  • Question

  • I WRITE CAD / CAM SOFTWARE. CURRENTLY USING VISUAL STUDIO 2017 PRO ON HP TS 17 ENVY LAPTOP AND AN HP DIT111 (EXTENDED) MONITOR, ALL RUNNING ON WINDOWS 10, VERSION 1803. A WHILE BACK, I NOTICED THAT THE KEY DOWN EVENT WOULD OCCASIONALLY CAUSE THE FORM TO LOSE FOCUS. WHEN THIS HAPPEND, I DISCOVERED EXECUTION CONTINUED IN THE LOST_FOCUS EVENT HANDLER. IN THE FORM_LOSTFOCUS EVENT, I WOULD RE-INITIALIZE GRAPHICS AND REFRESH THE SCREEN AS A WORKAROUND, NEVER FINDING WHY A KEY PRESS WOULD CAUSE THE FORM TO LOSE FOCUS. WHEN THIS HAPPEND, IT SEEMED THAT FORM_GOTFOCUS NEVER FIRED.

    RECENTLY, THERE WAS A SUGGESTION THAT THE APPLICATION COULD BENEFIT FROM USING AN EXTENDED MONITOR TO DISPLAY PDF FILES. THE PDF FILES OPEN ON THE EXTENDED MONITOR IN 'RESTORE DOWN' MODE (MULTI-TASKING). MY WINFORM STATE IS 'MAXIMUM'. THE CURSOR AND THE PDF SEEM TO HAVE FOCUS AS USUAL, HOWEVER; MOVING THE CURSOR BACK FROM THE EXTENDED MONITOR TO THE VISUAL BASIC APPLICATION DOES NOT SEEM TO EVER CAUSE THE VISUAL BASIC FORM TO ONCE AGAIN GAIN FOCUS. MOUSE CLICKING, KEYBOARD PRESSING, TOUCH SCREEN TOUCHING, WHATEVER; I CANNOT SEEM TO GET FORM_GOTFOCUS (OR SOME OTHER EVENT) TO START BACK UP. I CAN ISSUE A [CTRL] + [ALT] + [DEL] AND OFTEN GAIN CONTROL BACK TO THE APPLICATION WHEN TASK MANAGER OPENS. 

    DOES ANY ONE KNOW WHERE THE OPERATING SYSTEM CALL BACK TO VISUAL BASIC GOES TO? CHECKED EVERY EVENT I COULD THINK OF. TO THE CASUAL OBSERVER, EXTENDED MONITOR MODE IS JUST MORE 'WINDOWS REAL-ESTATE', SO WHEN THE CURSOR IS BACK OVER THE WINFORM, WHY DOES THE APPLICATION APPEAR LOCKED UP?


    Friday, October 19, 2018 6:40 PM

All replies

  • Hello,

    You might have better luck if all your text was not in upper-case.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, October 19, 2018 11:32 PM
    Moderator