August 21st, 2014, 08:44 AM
VB6 user control and Win7 task bar focus problem
Hi I have noticed something wierd.
If I have VB app which has VB user control (VB ocx control or user control directly in project) on it.
When I minimize that apps main window from taskbar icon or system menu then previous app does not get focus.
If I remove user control then everything works as planned.
I checked with Spy++ and it seems that VB user control creates some kind of proxy window (class name = "Static") for user control. If I kill this window explicitly then focus works again (this ofcourse is not the solution).
Is there any solution for this problem?
Or is this just known feature of VB6 with which we have to live?
I attached two very simple examples for reference, one with user control and other without it.
Windows7 enterprise, 64 bit, Service pack1.
VisualStudio 6 SP6
any information is appreciated.
PS: This does not happen with controls done with VC6, but porting from VB6 to VC6 is not an option at the moment.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.