CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2002
    Posts
    8

    how to realize that?

    normally when minimize an application,the app will disappear from the windows desktop and will place an item at the taskbar!
    then how can i avoid it to place an item at the taskbar?
    just have a notification icon,when i double-click the notification icon,the application will resume!
    thanks!



  2. #2
    Join Date
    May 2002
    Location
    New York, New York
    Posts
    20

    Re: how to realize that?

    > then how can i avoid it to place an item at the taskbar?

    MyForm.ShowInTaskbar = false;




  3. #3
    Join Date
    May 2002
    Location
    New York, New York
    Posts
    20

    Re: how to realize that?

    To elaborate:

    Add a NotifyIcon component to your primary form class.

    Add Event handlers for the Click and/or DoubleClick event for the NotifyIcon component and do something like the following to restore your primary form.


    this.Visible = !this.Visible;
    this.WindowState = FormWindowState.Normal;




    Add an event handler for the forms Deactivate event and do something like the following to hide the primary form.


    this.Visible = (this.WindowState != FormWindowState.Minimized);






  4. #4
    Join Date
    Apr 2002
    Posts
    8

    Re: how to realize that?

    thanks!
    to you maybe it is a minor question.
    but to me it is great help!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured