

((I would not have suspected SetForegroundWindow because the TXT.WINDOW was created, and stayed, "on top" of the console.))
Thanks again guys,
#COMPILE EXE #DIM ALL %UNICODE = 1 #INCLUDE ONCE "WIN32API.INC" FUNCTION TxtWindow () AS LONG LOCAL hTWin AS DWORD ' TXT.WINDOW ("test", 120, 320, 5, 60) TO hTWin TXT.PRINT "Some text."$$ SetForegroundWindow(hTWin) TXT.WAITKEY$ TXT.END END FUNCTION ' FUNCTION PBMAIN () AS LONG LOCAL hTWin AS DWORD con.print "Open a TXT.WINDOW on any key."$$ con.waitkey$ 'REMed out the TXT.WINDOW receives keystrokes 'unREM the line to see the problem 'The caption in TXT.WINDOW "greyed" with CON.WAITKEY$ here. 'Click on TXT.WINDOW, then TXT.WAITKEY$ (above) works. TxtWindow ' con.print "Close on any key."$$ con.waitkey$ END FUNCTION ' '
#compile exe #dim all %UNICODE = 1 function TxtWindow () as long local hTWin as dword ' txt.window ("test", 120, 120, 5, 60) to hTWin txt.print "Some text."$$ '(API function SetFocus(hTWin) does not work)((tested and read learn.microsoft)) txt.waitkey$ txt.end end function ' function pbmain () as long local hTWin as dword con.print "Open a TXT.WINDOW on any key."$$ 'con.waitkey$ 'REMed out the TXT.WINDOW receives keystrokes 'unREM the line to see the problem 'The caption in TXT.WINDOW "greyed" with CON.WAITKEY$ here. 'Click on TXT.WINDOW, then TXT.WAITKEY$ (above) works. TxtWindow ' con.print "Close on any key."$$ con.waitkey$ end function '
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: