Skip to content

When process is stoped remove icon of the program

Dozd

Asked Oct 7, 2010, 9:21 AM EDT3 answers
Share
LinkedInX
Hi I have a program that work good in general but I want to corect one  not very big problem. So in the code there is a method called music() that starts VLC player (default for mp3 format) sevreal times during a day (using a timer). Several minutes after start,  program  is calling method stopVLC() that stops VLC player.This solution is working but after several starts and stops on the taskbar there are also several icons of vlc player (not active icons). If mouse is "touch" one of them all desappears.
So I want to prevent stay of VLC's icons on the task bar. If "vlc" proces is killed I do not like VLC's icons on task bar.
Code is:
private void music()
 {
           
             Process song = Process.Start(@"d:\MySong.mp3");
         
}
 public void stopVLC()
 {
             Process[] proc = Process.GetProcessesByName("vlc");
             foreach (Process vlc in proc)
             {
                 vlc.Kill();
             }
}

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi there !!!
    If you don't want to see the VLC icon on task bar, you just have to go through the VLC settings !!!
    Click Tools -> Preferences or you can simply hit CTRL + P in the VLC background.
    and then it will appear a window (preferences window).
    Look in the "Interface Type" Field, you just have to uncheck the "Systray icon" box, and then click save and you're done !!!
    VLC's icons will never appear in your task bar again !!!
    0
  • 2 short replies
    • 0
      Thanks :)
       
      0
    • 0
      you welcome :)))
      0