focus

Letting a Window believe it is still in focus although it is not

南笙酒味 提交于 2021-02-07 04:13:42
问题 I have to deal with a nasty MS Windows application that quits doing its job as soon as it loses focus. My question is, how can I trick this application somehow to believe that it is still in focus, although it really is not? My thoughts are: Is it possible to suppress the corresponding "WM" message from just this application? Can I send a fake message to this window that it acts like it is in focus? 回答1: Sending the WM_ACTIVATE message works for some apps: SendMessage(hWnd, WM_ACTIVATE, WA

Differences between CSS3 :hover and :focus?

寵の児 提交于 2021-02-05 17:50:12
问题 The CSS3 doc talks about :hover and :focus, which seem exactly the same to me. What are the differences between the two? What am I not seeing? Thanks! 回答1: Hover is 'true' when the mouse pointer is over an element. Focus is true if the cursor is in that element. It's possible for hover to be false and focus true (e.g click in a text field then move the mouse away) 回答2: :hover applies to any element that the mouse cursor is currently over. :focus refers to form focus, and is the current form

Differences between CSS3 :hover and :focus?

孤人 提交于 2021-02-05 17:50:10
问题 The CSS3 doc talks about :hover and :focus, which seem exactly the same to me. What are the differences between the two? What am I not seeing? Thanks! 回答1: Hover is 'true' when the mouse pointer is over an element. Focus is true if the cursor is in that element. It's possible for hover to be false and focus true (e.g click in a text field then move the mouse away) 回答2: :hover applies to any element that the mouse cursor is currently over. :focus refers to form focus, and is the current form

How to send keys data to a Console window without having focus

喜欢而已 提交于 2021-02-05 12:04:55
问题 I've been trying to send data to a console window without it having focus. I've used a simple Keyboard Hook from here: Capture keystroke without focus in console I've modified the code provided from the answer on that page to display the unicode values of keys that have been pressed; my modifications are as follows: private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { var vkCode = Marshal.ReadInt32(lParam); var key =

How to send keys data to a Console window without having focus

笑着哭i 提交于 2021-02-05 12:04:43
问题 I've been trying to send data to a console window without it having focus. I've used a simple Keyboard Hook from here: Capture keystroke without focus in console I've modified the code provided from the answer on that page to display the unicode values of keys that have been pressed; my modifications are as follows: private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { var vkCode = Marshal.ReadInt32(lParam); var key =

javascript how check if browser got focus

亡梦爱人 提交于 2021-02-05 08:01:49
问题 I have a working chat based on Meanjs and I would like to add a new feature to it that I see on other chats available: Feature: 1. when a message is received, the title of the window starts to switch between what it was, and a notification message like "new message" 2. when the browser or tab receives the focus, to stop the ongoing activity and reset back to the static page title The first one is simply to have a timer and change the page title during an interval, but I don't know how to get

chrome extension: creating new tab and taking focus to page

五迷三道 提交于 2021-02-04 11:46:46
问题 trying to make an extension that creating new tab and navigating it to some site and giving some <input> to focus. I check this question but cant solve my problem: How to steal focus from the omnibox in a Chrome extension on the new tab page? here is a sample code that I am trying to open a new tab navigating to google and trying to focus on the google search bar. this is my content_script.js try to catch a click on specified web page and specified <div> and send a message to my background.js

chrome extension: creating new tab and taking focus to page

那年仲夏 提交于 2021-02-04 11:46:05
问题 trying to make an extension that creating new tab and navigating it to some site and giving some <input> to focus. I check this question but cant solve my problem: How to steal focus from the omnibox in a Chrome extension on the new tab page? here is a sample code that I am trying to open a new tab navigating to google and trying to focus on the google search bar. this is my content_script.js try to catch a click on specified web page and specified <div> and send a message to my background.js

GWT: Textbox doesn't show Cursor on Ipad

∥☆過路亽.° 提交于 2021-01-29 16:42:50
问题 I am trying to implement a Textbox that can show fractions with GWT. Therefor I have an Canvas were I can draw what I want and receive KeyEvents and MouseEvents. But on Ipad (Safarie and Chrome) the software keyboard does not show, so I created an Composite and combined the Canvas with a Textbox witch gets the focus after each key or mouse Event on the Canvas. But the softkeyboard does not show up every time so I tried a bit and can see, that the Textbox seems to get the focus (it gets a blue

Window not activated when the application is run from Task Scheduler

為{幸葍}努か 提交于 2021-01-29 04:53:01
问题 In my appplication I am trying to focus a textbox so I can type straight away after the Form is loaded. When the Form is shown, I can see is the cursor blinking in the TextBox but if I type something nothing happens. I need to click the Window to start entering text in the TextBox . If I run my application normally from Visual Studio, it will work perfectly, but if my application is run using the Task Scheduler, then this happens. Do you have any advice? Below is my code: this.TopMost = true;