Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Form using too much memory

Form using too much memory

Scheduled Pinned Locked Moved C#
performancequestion
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shaun Becker
    wrote on last edited by
    #1

    In an application I am working on, I have a form that on startup, loads my addin structure and some other useful static classes. When I watch Task Manager during the form's startup, it starts up using 13500K of memory. If I minimize the form, it shoots down to 300K. Then when I restore it, it goes to only 1000K. If I start the form minimized, it still starts up taking 13500K. Then when I restore it, if jumps up 13600K. Then when I minimize it again, it drops back to 300K and up to 1000K when I restore it. Is there a way to avoid this form using so much memory on startup without having to minimize it and restore it? Thanks

    J 1 Reply Last reply
    0
    • S Shaun Becker

      In an application I am working on, I have a form that on startup, loads my addin structure and some other useful static classes. When I watch Task Manager during the form's startup, it starts up using 13500K of memory. If I minimize the form, it shoots down to 300K. Then when I restore it, it goes to only 1000K. If I start the form minimized, it still starts up taking 13500K. Then when I restore it, if jumps up 13600K. Then when I minimize it again, it drops back to 300K and up to 1000K when I restore it. Is there a way to avoid this form using so much memory on startup without having to minimize it and restore it? Thanks

      J Offline
      J Offline
      je_gonzalez
      wrote on last edited by
      #2

      Try using .NET framework 1.1 (This is assuming that you are using 1.0 under XP).

      S 1 Reply Last reply
      0
      • J je_gonzalez

        Try using .NET framework 1.1 (This is assuming that you are using 1.0 under XP).

        S Offline
        S Offline
        Shaun Becker
        wrote on last edited by
        #3

        I am using 1.0 under Windows 2000 professional. However, that arises another question, how do I change VS.NET 2002 to use 1.1 instead of 1.0?

        H C 2 Replies Last reply
        0
        • S Shaun Becker

          I am using 1.0 under Windows 2000 professional. However, that arises another question, how do I change VS.NET 2002 to use 1.1 instead of 1.0?

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You can't, but you can use the command line compiler csc.exe from the .NET Framework 1.1 (SDK not required but recommended) installation directory.

          Microsoft MVP, Visual C# My Articles

          C 1 Reply Last reply
          0
          • S Shaun Becker

            I am using 1.0 under Windows 2000 professional. However, that arises another question, how do I change VS.NET 2002 to use 1.1 instead of 1.0?

            C Offline
            C Offline
            Charlie Williams
            wrote on last edited by
            #5

            Shaun Becker wrote: how do I change VS.NET 2002 to use 1.1 instead of 1.0? Unfortunately, you don't. VS.NET 2002 only works with v1.0 of the framework and VS.NET 2003 only works with v1.1. You'll have to upgrade if you want to use Visual Studio to compile for v1.1. There's nothing stopping you from compiling against v1.1 using the command-line compiler, though. Charlie if(!curlies){ return; }

            C 1 Reply Last reply
            0
            • H Heath Stewart

              You can't, but you can use the command line compiler csc.exe from the .NET Framework 1.1 (SDK not required but recommended) installation directory.

              Microsoft MVP, Visual C# My Articles

              C Offline
              C Offline
              Charlie Williams
              wrote on last edited by
              #6

              Damn, you're too quick:-D Charlie if(!curlies){ return; }

              1 Reply Last reply
              0
              • C Charlie Williams

                Shaun Becker wrote: how do I change VS.NET 2002 to use 1.1 instead of 1.0? Unfortunately, you don't. VS.NET 2002 only works with v1.0 of the framework and VS.NET 2003 only works with v1.1. You'll have to upgrade if you want to use Visual Studio to compile for v1.1. There's nothing stopping you from compiling against v1.1 using the command-line compiler, though. Charlie if(!curlies){ return; }

                C Offline
                C Offline
                CWIZO
                wrote on last edited by
                #7

                You can make your apps writen in vs.net 2003 combabilitable with 1.0. Check the Projecr Properties->Common Properties->General->Suported Runtimes Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

                C 1 Reply Last reply
                0
                • C CWIZO

                  You can make your apps writen in vs.net 2003 combabilitable with 1.0. Check the Projecr Properties->Common Properties->General->Suported Runtimes Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

                  C Offline
                  C Offline
                  Charlie Williams
                  wrote on last edited by
                  #8

                  By, "works with", I meant "compiles to". Yes, you can specify in your app's config file that you'll support more then one version of the .NET framework (which VS.NET does for you when you change this field in Project Properties), but that doesn't guarantee that your app will actually work with that version. You're basically just telling the CLR that it's ok to run your app with the framework versions listed. The question I answered was about configuring VS.NET 2002 to compile to the v1.1 version of the framework, which cannot be done. Charlie if(!curlies){ return; }

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups