473,738 Members | 3,636 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Minimize and Maximize

Hey Group,
When I minimize and then maximize a form (in windows application), I see a
significant drop in memory usuage in the task manager. I tried to do the
same thing programatically during the form load event, but I don't see any
significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan
Nov 16 '05 #1
7 4033
Check out this blog post:

Reducing WinForm Memory Footprint with SetWorkingSet
http://west-wind.com/weblog/posts/240.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://msmvps.com/windsor/

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I see a
significant drop in memory usuage in the task manager. I tried to do the
same thing programatically during the form load event, but I don't see any
significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan

Nov 16 '05 #2
Bhargavan,

Why are you trying to do this? Are you finding that it is consuming too
much memory and impacting other applications on the machine?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I see a
significant drop in memory usuage in the task manager. I tried to do the
same thing programatically during the form load event, but I don't see any
significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan

Nov 16 '05 #3
While I find the article informative, I think that the most important
line in it is:

In a way this is cheating the app – but it certainly improves the impression
of memory usage of the application on the machine.

That doesn't mean it's actually doing anything. In the end, people
really need to learn what the number in task manager means, and why they
^shouldn't^ use it to gauge memory consumption or performance of a .NET
application.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Rob Windsor [MVP]" <ro************ *****@gmail.com > wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Check out this blog post:

Reducing WinForm Memory Footprint with SetWorkingSet
http://west-wind.com/weblog/posts/240.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://msmvps.com/windsor/

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I see
a significant drop in memory usuage in the task manager. I tried to do
the same thing programatically during the form load event, but I don't
see any significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan


Nov 16 '05 #4
Hey Nicholas,
Actually I am running my windows application over a terminal server. So at
any time there will be a number of instances of the same application on the
terminal server and thats the many reason for my memory concern. I am
already using SetProcessWorki ngSetSize but I want to improve the performance
even further. Any suggestions?
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:OH******** ******@tk2msftn gp13.phx.gbl...
Bhargavan,

Why are you trying to do this? Are you finding that it is consuming
too much memory and impacting other applications on the machine?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I see
a significant drop in memory usuage in the task manager. I tried to do
the same thing programatically during the form load event, but I don't
see any significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan


Nov 16 '05 #5
Bhargavan,

Without knowing about your application, I can't really say. However, I
would focus on the code that you write, as opposed to the CLR when looking
for performance gains. This isn't to say that your coding is bad or
whatnot, but usually, gains can be made in your own code before looking at
the environment or the runtime.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:O5******** ******@tk2msftn gp13.phx.gbl...
Hey Nicholas,
Actually I am running my windows application over a terminal server. So at
any time there will be a number of instances of the same application on
the terminal server and thats the many reason for my memory concern. I am
already using SetProcessWorki ngSetSize but I want to improve the
performance even further. Any suggestions?
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:OH******** ******@tk2msftn gp13.phx.gbl...
Bhargavan,

Why are you trying to do this? Are you finding that it is consuming
too much memory and impacting other applications on the machine?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I see
a significant drop in memory usuage in the task manager. I tried to do
the same thing programatically during the form load event, but I don't
see any significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan



Nov 16 '05 #6
Hey Nicholas,
I don't think it is with my code. Even with just a blank form, you could see
the memory usuage drop drastically if you minimize and maximize it. You can
do this yourself. Just create a appliaction with a blank windows form in it.
Run it, see the memory usuage in task manager, then minimize and maximize
your application and check your memory usuage on the task manager again. You
will see a significant decrease in memory usuage. I am just trying to do the
same thing programatically (inside the form load event). But the memory drop
is not that significant and I donno why.
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Bhargavan,

Without knowing about your application, I can't really say. However, I
would focus on the code that you write, as opposed to the CLR when looking
for performance gains. This isn't to say that your coding is bad or
whatnot, but usually, gains can be made in your own code before looking at
the environment or the runtime.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:O5******** ******@tk2msftn gp13.phx.gbl...
Hey Nicholas,
Actually I am running my windows application over a terminal server. So
at any time there will be a number of instances of the same application
on the terminal server and thats the many reason for my memory concern. I
am already using SetProcessWorki ngSetSize but I want to improve the
performance even further. Any suggestions?
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:OH******** ******@tk2msftn gp13.phx.gbl...
Bhargavan,

Why are you trying to do this? Are you finding that it is consuming
too much memory and impacting other applications on the machine?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
Hey Group,
When I minimize and then maximize a form (in windows application), I
see a significant drop in memory usuage in the task manager. I tried to
do the same thing programatically during the form load event, but I
don't see any significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan



Nov 16 '05 #7
What kind of machine are you developing in? I don't see that happening on
my laptop or my desktop for that matter.

--
in**@dowhileloo p.com
http://dowhileloop.com website development
http://publicjoe.dowhileloop.com -- C# Tutorials

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:uF******** ******@TK2MSFTN GP10.phx.gbl...
Hey Nicholas,
I don't think it is with my code. Even with just a blank form, you could see the memory usuage drop drastically if you minimize and maximize it. You can do this yourself. Just create a appliaction with a blank windows form in it. Run it, see the memory usuage in task manager, then minimize and maximize
your application and check your memory usuage on the task manager again. You will see a significant decrease in memory usuage. I am just trying to do the same thing programatically (inside the form load event). But the memory drop is not that significant and I donno why.
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Bhargavan,

Without knowing about your application, I can't really say. However, I would focus on the code that you write, as opposed to the CLR when looking for performance gains. This isn't to say that your coding is bad or
whatnot, but usually, gains can be made in your own code before looking at the environment or the runtime.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:O5******** ******@tk2msftn gp13.phx.gbl...
Hey Nicholas,
Actually I am running my windows application over a terminal server. So
at any time there will be a number of instances of the same application
on the terminal server and thats the many reason for my memory concern. I am already using SetProcessWorki ngSetSize but I want to improve the
performance even further. Any suggestions?
Bhargavan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:OH******** ******@tk2msftn gp13.phx.gbl...
Bhargavan,

Why are you trying to do this? Are you finding that it is consuming too much memory and impacting other applications on the machine?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bhargavan" <bh********@yah oo.co.in> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...
> Hey Group,
> When I minimize and then maximize a form (in windows application), I
> see a significant drop in memory usuage in the task manager. I tried to> do the same thing programatically during the form load event, but I
> don't see any significant drop in memory usage. Anybody know why?
> Thanks,
> Bhargavan
>



Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2899
by: Sumit | last post by:
Hi all, I have an MDI form in which i open some other forms. I dont want the Control Box (having minimize, restore/maximize and close button) Even though I have set the controlbox property of my child forms as false & the respective minimize & maximize box property to false, i get the control box with restore button as enabled (when i dock my child form in the MDI form with dockstyle as fill) which restores the
3
8393
by: Paul Welter | last post by:
I'm building a MDI application that has child forms. I'm trying to find a way to hide the inner boarder of the child frame area. Setting the FormBoarderStyle of the child form has no effect. Also, when the parent form's FormBoarderStyle is set to nothing, then the child form is maximized, I get the minimize and maximize buttons at the top of the parent from even though the boarder style is set to none for both forms. How do I prevent...
3
5434
by: Don | last post by:
If you have a form that calls another form via the following code: Dim myForm as Form2 myForm = New Form2 myForm.Owner = Me MyForm.ShowDialog and you minimize the second form, the first form remains visible (albeit completely disabled).
3
8047
by: Stanav | last post by:
Hello all, Is there a way I can get into a form's close/minimize/maximize events when those buttons (the 3 small squared button in the upper right corner of a form) are clicked? For example, after a user makes changes on the data on the form and clicks on the form's Close button (instead of updating the datasource first), I want the program to run the update routine first, then close the form. All helps are greatly appreciated. I'm using...
2
2813
by: jj | last post by:
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are supposed to do. To maximize the window I have to go to "task manager" and double click the application. How do I control those maximize, minimize buttons on the top right section of my form? A learner here
1
2186
by: 1388-2/HB | last post by:
For vb2005. At design time I set the main form's WindoState to Maximized and I disabled the Maximize box. The user can Minimize the application only. When the program launches, the form is indeed Maximized. However: 1. The Maximized state of my form does not take the Windows taskbar state into consideration. The form behaves as if the user has their taskbar set to "autohide", even if they do not. The app extends all the way down...
1
2343
by: neeraj | last post by:
Hi people's I developed one MDI application with one MDI form and 2 child forms, form. Border style of first child forms set as Fixed3D and Window State set as normal (like dialog Box) and maximize button set false minimize button set false. My first child form name like FrmClient I have one another child form which Form Border Style property set as Fixed3D and
9
12845
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How to do this... and eventually i want to modify the control box in the form of ? _ X ... I.e. adding a new button to control box. I need to detect the click events.
1
1393
bwesenberg
by: bwesenberg | last post by:
Hello, I am not really sure if this is a form issue or not. I am running Access 2002 with a SQL back end for the database in question. The forms were original run from queries but are now being run from the tables to make them faster. Since I have done that the users are complaining of an issue when they minimize and then maximize the form. Here is a little history to explain the process they do. The open the form and have...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.