Hi,
Does anyone know how Windows allocates memory for controls? For example,
given a huge Panel, say, in a relatively much smaller Form with scrollbars,
will Windows attempt to allocate a huge area of memory for the Panel's
visible surface, or will it only allocate as much as is required (i.e. as
much as is visible)?
If the former, is there any way of preventing this? Like telling it that at
this point in time, only X amount of the panel will be necessary?
Thanks,
Steve 6 1844
Steve,
windows doesn't allocate memory for contorl surfaces. Amount of memory used
depends on the number of controls used on form, not of its size.
HTH
Alex
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with
scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e. as much as is visible)?
If the former, is there any way of preventing this? Like telling it that
at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
Steve,
windows doesn't allocate memory for contorl surfaces. Amount of memory used
depends on the number of controls used on form, not of its size.
HTH
Alex
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with
scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e. as much as is visible)?
If the former, is there any way of preventing this? Like telling it that
at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
Hi,
Thanks for the reply. To clarify then, I should be able to create a Panel
that's 100,000 X 100,000 pixels if I like, and as long as I don't try to put
an Image on top of it it should be fine? In that case, how does Windows
decide what to display for any parts of the control that are visible? And
assuming it buffers the visible surface, is it definitely the case that it
doesn't try to buffer the entire surface of the control?
Steve
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl... Steve,
windows doesn't allocate memory for contorl surfaces. Amount of memory
used depends on the number of controls used on form, not of its size.
HTH Alex
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e.
as much as is visible)?
If the former, is there any way of preventing this? Like telling it that at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
Hi,
Thanks for the reply. To clarify then, I should be able to create a Panel
that's 100,000 X 100,000 pixels if I like, and as long as I don't try to put
an Image on top of it it should be fine? In that case, how does Windows
decide what to display for any parts of the control that are visible? And
assuming it buffers the visible surface, is it definitely the case that it
doesn't try to buffer the entire surface of the control?
Steve
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl... Steve,
windows doesn't allocate memory for contorl surfaces. Amount of memory
used depends on the number of controls used on form, not of its size.
HTH Alex
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e.
as much as is visible)?
If the former, is there any way of preventing this? Like telling it that at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
Steve,
In addition to the other comments.
The visible surface of a control is painted (created) each time in the
controls Paint event. There is no memory allocated for the display of the
control per se.
For a complete discussion on Controls & Windows Forms and Paint events, see
Charles Petzold's book "Programming Microsoft Windows with Microsoft Visual
Basic .NET - Core Reference" from MS Press, a C# version of the book is also
available.
Hope this helps
Jay
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with
scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e. as much as is visible)?
If the former, is there any way of preventing this? Like telling it that
at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
Steve,
In addition to the other comments.
The visible surface of a control is painted (created) each time in the
controls Paint event. There is no memory allocated for the display of the
control per se.
For a complete discussion on Controls & Windows Forms and Paint events, see
Charles Petzold's book "Programming Microsoft Windows with Microsoft Visual
Basic .NET - Core Reference" from MS Press, a C# version of the book is also
available.
Hope this helps
Jay
"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl... Hi,
Does anyone know how Windows allocates memory for controls? For example, given a huge Panel, say, in a relatively much smaller Form with
scrollbars, will Windows attempt to allocate a huge area of memory for the Panel's visible surface, or will it only allocate as much as is required (i.e. as much as is visible)?
If the former, is there any way of preventing this? Like telling it that
at this point in time, only X amount of the panel will be necessary?
Thanks,
Steve
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Penn Markham |
last post by:
Hello all,
I am writing a script where I need to use the system() function to call
htpasswd. I can do this just fine on the command line...works great
(see attached file, test.php). When my...
|
by: Olli Krollmann |
last post by:
hello folks,
we have been developing several .NET-based windows forms applications during
the last two years. there are two mysterious display problems that we have
encountered so far but have...
|
by: Niall |
last post by:
I'm not quite sure which groups to post this to, so short of a massive
crosspost, I decided on these two.
I am running into troubles with resource usage of our app on Win2k and above
systems. In...
|
by: lwickland |
last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately
large bytes when sending large post data.
The following application consumes inordinate quantities of memory. My code...
|
by: Graeme Neath |
last post by:
I'm having a very bizarre problem. I have a vb.net application which uses
the ESRI MapObjects 2.2 component (unmanaged code). When I use the
MapObjects built-in function 'CopyMap' to copy the map...
| |
by: Steve McLellan |
last post by:
Hi,
Does anyone know how Windows allocates memory for controls? For example,
given a huge Panel, say, in a relatively much smaller Form with scrollbars,
will Windows attempt to allocate a huge...
|
by: forest demon |
last post by:
for example, let's say I do something like,
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
if the user does a SaveAs (in notepad), how can i capture the path that
the user...
|
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= |
last post by:
Hi everybody,
I'm working on my application for appr. 2 years and now suddenly I got an
System.TypeInitializationException in one of my global modules. The error is
thrown at the first call of a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
|
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...
|
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...
|
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 ...
| |