C++Builder logo
How to hide the 'Start' button Comment cacher le bouton 'Démarrer'
 
To hide the Start button in the taskbar, put the code below in your application : Placer le code suivant dans votre application pour cacher le bouton 'Démarrer' de la barre des tâches:
 

HWND TaskBarHandle,ChildWindowHandle; 
char WindowClass[256]; 
TaskBarHandle=FindWindow("Shell_TrayWnd",NULL);       //get taskbar Handle 
if(TaskBarHandle) 

  ChildWindowHandle=GetWindow(TaskBarHandle,GW_CHILD); 
  while (ChildWindowHandle) 
  { 
    GetClassName(ChildWindowHandle,WindowClass,255);  //get child Handle 
    if(!strcmp(WindowClass,"Button"))                 //if it's a button 
      ShowWindow(ChildWindowHandle,SW_HIDE);          // hide button 
    ChildWindowHandle=GetWindow(ChildWindowHandle,GW_HWNDNEXT); //get next child 
  } 

 



If you want to show the button again, replace SW_HIDE with SW_SHOW in the line : Pour afficher à nouveau le boutton 'Démarrer', remplacer SW_HIDE par SW_SHOW dans la ligne :

ShowWindow(ChildWindowHandle,SW_SHOW);