Search code examples
c++c++buildershow-hidetaskbar

How to hide form from taskbar in c++ builder?


I have simple VCL Forms application which on start show on taskbar button if is in use, what i want to do is to hide those button, so that mean whatever is happen with form that those button don't appear. Case can be that forms is shown or hidden or any other but button have to be hidden, how to do that?

P.S. I see that question like this exist but they don't work in my cause.


Solution

  • Try the following approach:

    • Set MainFormOnTaskBar to false
    • Call ShowWindow(Application->Handle, SW_HIDE); inside the main form's OnShow event handler.
    • Call ShowWindow(Application->Handle, SW_HIDE); inside the main form's OnActivate event handler.

    Source: http://delphi.about.com/od/delphitips2008/qt/hide_taskbutton.htm