locked
VB6 user control and Win7 task bar focus problem RRS feed

  • Question

  • 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.

    System Info
    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.


    <iframe frameborder="0" height="120" scrolling="no" src="https://onedrive.live.com/embed?cid=502C283D0561B05F&resid=502C283D0561B05F%21225&authkey=AE8cAy2NfqytnvY" width="98"></iframe>
    • Edited by Chopper Pappa Thursday, August 21, 2014 1:15 PM
    • Moved by Carl Cai Friday, August 22, 2014 1:53 AM VB6 is not supported
    Thursday, August 21, 2014 1:02 PM

Answers

  • Hello,

    This forum is for VB.NET, I would highly suggest asking your question on VB-Forums under VB6 section.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    • Proposed as answer by Cor Ligthert Thursday, August 21, 2014 2:47 PM
    • Marked as answer by Just Karl Thursday, September 4, 2014 10:32 PM
    Thursday, August 21, 2014 1:13 PM