Question

I have a vb.net program that rarely minimize at the left bottom of desktop. Normally if i minimize by it minimizes to taskbar. But only sometimes it minimizes as shown below (You can see Shortcut_nvt program minimized at left bottom of desktop). Anyone know anything about this behavior? Why does it happen?

enter image description here

Était-ce utile?

La solution

[This is not really an answer, but too long for a comment.]

This is normal Windows behaviour pre-taskbar. As capabilities were added to Windows replacing the old Program Manager they retained backward compatibility so the old Windows messages all still work. However the taskbar intercepts messages and adds some of its own to provide new behaviour. What you call 'minimise to the taskbar' actually hides the application window and replaces it by a button maintained by the taskbar. The old Windows minimise behaviour is normally suppressed, and somehow you've woken it up.

My guess is that you're doing something in your program to interrupt the flow of Windows messages so that the linkage with the taskbar malfunctions. You should look for things like preview handlers or hooks or message pump code as the culprit. You can diagnose this behaviour by using Spy++ (Visual Studio) and watching messages, but it's not easy.

Sorry not to be more helpful, but this part of Windows is very complicated and hard to debug. I'll be interested to hear if you get any more useful info.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top