Re: Is there an AutoHide code in Euphoria?
- Posted by eumario Feb 15, 2011
- 1180 views
Hello, Selgor here. These are my thoughts of actions to take .Maybe try the following : set visible window to zero.Then if ,mouse is moved to a screen position ,activate the window with set visible 1. I assume the window is still "active", though not visible. Just a start. Cheers, Selgor.
One of the first things you will need to do, when you create your Tool strip window, is to set the extended class info with the WS_EX_TOPMOST flag. This will ensure that the window will always remain ontop of other windows, this way, mouse events can occur on the window. As if any other window is on the screen, can overlap your window, and therefore, won't get any events. The next thing you need to do, is to make sure the window remains visible, but take and have it resize down to like 1 pixel in size, wherever you have the tool strip docked at, top, bottom, or sides of the screen. This way, it won't show over over windows, and get in the way.
The next part, is two events, onMouseEnter, and onMouseLeave, these events will happen even if the Application doesn't have focus, I believe. I could be wrong though. It has been a while since I've messed with Win32lib. Basically, when you get an onMouseEvent event, you would resize your tool strip window back to the original size, and when you receive the onMouseLeave, you can either set a timer to delay the resizing of the window back to 1 pixel, or immediately resize back to 1 pixel. Up to you.
hth,
Mario