Detect mouse clicks while form isn't focused? - vb.net

I'm trying to make a key visualizer for my son when he plays video games. It's an overlay at the top of your screen that shows the W, A, S, D, SpaceBar, Shift, Right Mouse and Left Mouse which change color when the buttons are clicked.
The only problem is, you have to have the form focused to detect mouse clicks/key presses, and I'm not sure where to start or what to use to code this.
If anyone could help me with only the mouse clicks (I've already started to get the general idea of key presses) that would be great. Thank you in advance!

Related

Detect mouse pressed events outside window Processing 2.0

I am trying to find a way where I can click out side of the program's window and have the program pick up any time I press the mouse (Ex: Have Chrome or a game open and every time the mouse button is pressed processing is told the mouse is being pressed). I do not need any information to be sent to the program besides the fact that the mouse button has been pressed.
Thank you

In selenium automation mouse arrow movement is it possible for a test case

I am new to selenium .. I want to know how the mouse arrow movement can be shown to the user.I mean to say we automate certain things.. I want to know how we can get the mouse arrow movement to the user who is seeing the automation going on in selenium. Is it possible ???
Can we clearly show what is being clicked , I mean which button is being clicked by mouse arrow movement.
I hope I am clear
There is add-on, which highlight elements being clicked. You can find that 1
https://addons.mozilla.org/en-US/firefox/search/?q=element+highlighter+selenium+IDE&appver=11.0&platform=windows..
As per my knowledge it is not possible to show mouse arrow movement

ignore mouse event on label inside panel

I am making a custom menu. I am applying colors on panels on mouse enter and mouse leave.
I have labels on these panels, and the mouse enter and leave events work snappy, but as soon as I hover over the label (on/inside) the panel, the mouse leave event is fired. I know I can just do the same thing for the label mouse enter event, but I am doing some other visual stuff, and I need to have the label mouse events totally disregarded. Any ideas?
Thanks in advance.
I eventually just used the menu control, and styled it accordingly. Does the job better than I could with code...

CF - Button when pressed receives a focus (bold border)

As the question is asked ... how can i prevent that from happening?
I have ZOOM IN and ZOOM OUT button that receive focus after pressed.
The button in CF does not have focus property so im guessing im required to do another painful workaround...
Any ideas?
This is the way the system draws the buttons when clicked. If you don't want this you'll have to redraw the button (and it various states) yourself

VB.NET Minesweeper issue

I have fully programmed my Minesweeper; however, I was having difficulty trying to get the same result as in the original minesweeper for when a user clicks and moves the mouse around while still right clicking. You may notice that in the original Minesweeper, when a user does as explained, the tiles that the user goes to will then look blank. If the user releases the mouse, the current tile they hovered to will become the clicked tile. In my Minesweeper, the tile I click on is the only one that will look blank, and when I hover over to the next tiles, they do not get blank like the first one I clicked on. Then when I release my mouse button when over to another tile, the very first tile I clicked on is the one that gets uncovered. Here is what I already have used. I have the MouseDown event which checks to see if the game has been started to begin the game timer. It also has some color properties for tiles when I click on them and I set a boolean to true or false depending on the user left or right click. I have the MouseUp event which looks at the boolean to determin what the user had clicked on the mouse so I know if I flag or simply click to uncover. Then I have the MouseEnter and MouseLeave which are needed to yield the proper glow I want for the tiles. What should I do to get the same results as in the original Minesweeper with the MouseDown and MouseEnter into other tiles? I tried many other things such as MouseEnter, MouseMove and MouseHover, but all seem to yield the same crummy result as what I already have.
Just another piece of information, the MouseEvents are built in to a UserControl which I then use as my tile in Minesweeper. It almost as if when an event is active, another one cannot be done at the same time.
You might want to consider, DragOver and Drag related events