Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15535

[RESOLVED] trigger when taskbar changes position while maximize

$
0
0
background:
- a form that is maximized to not cover the taskbar, it will resize using:
Code:

hwnd = FindWindow("Shell_TrayWnd", "")
GetWindowRect hwnd, rect

to know where the taskbar is located and to not cover it.

- now, if I move the taskbar to the left side, I get a "paint" notification, and thats enough to call the function again to place the form from the right taskbar position.

but the problem is when I move back the taskbar to the bottom, I dont get any "paint" notification (or resize) or anything that would tell me something is happening, and the form will still "believe" the taskbar is on the left side.

I dont like the idea to monitoring Shell_TrayWnd with a timer, is there something else we could do?

subclassing? right now Im subclassing the mousewheel, so if its possible using subclassing I can just add something there, but not sure what. maybe form displacement?

Viewing all articles
Browse latest Browse all 15535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>