CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Location
    Cat Square (near Charlotte)
    Posts
    16

    Disabling Minimize Animation?

    I'm developing an app that sits in the tray. When I double-click on the icon while it is in the tray, animation makes it appear as if the program was "asleep" just over the START button. When I minimize it, it animates back down towards the START button.

    Most other similar tray applications that I have simply make the window appear and or disappear, and I would prefer mine to do that as well.

    The code for each action is simply this:

    // minimizing
    private void Form1_Resize(object sender, EventArgs e)
    {
    if (FormWindowState.Minimized == WindowState)
    Hide();
    }

    // restoring
    private void mailBoxIcon_DoubleClick(object sender, EventArgs e)
    {
    Show();
    WindowState = FormWindowState.Normal;
    }


    How can I cause my form to not go through the animation?
    C# - Visual Studio 2005
    Frameworks 2.0

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Disabling Minimize Animation?

    Why not just Show the form, and Hide the form, instead of changing the WindowState ¿

  3. #3
    Join Date
    Feb 2007
    Location
    Cat Square (near Charlotte)
    Posts
    16

    Re: Disabling Minimize Animation?

    Quote Originally Posted by HanneSThEGreaT
    Why not just Show the form, and Hide the form, instead of changing the WindowState ¿

    Guess I was trying to use the standard "Control Box" (minimize, maximixe, close) options, but see that at least some of my tray apps don't do it this way, but instead have a separate OK/Close button where they must be doing it as you suggest.

    Good idea... .thanks
    C# - Visual Studio 2005
    Frameworks 2.0

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