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 1868
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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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***********@ SPAMsympaticoPL EASE.ca> wrote in message
news:e$******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP10.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***********@ SPAMsympaticoPL EASE.ca> wrote in message
news:e$******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP10.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 "Programmin g 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******** ******@TK2MSFTN GP10.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 "Programmin g 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******** ******@TK2MSFTN GP10.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 webserver runs that part of the
script (see attached file, snippet.php), though, it doesn't go through.
I don't get an error message or anything...it just returns a "1"
(whereas it should return a "0") as far as I can tell. I have read the
PHP...
|
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 been unable to find any information about:
1. distorted fonts. when placing label controls on forms or setting form or
grid captions we often notice that the label or title text is stretched out
in the left part, displays correctly in the middle...
|
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 several places, I have seen it said that the WinNT model only
limits resources to available memory. However, I have seen errors caused by
running out of resources on a machine with over 1GB of free memory (running
Win2k server), as well as on my...
|
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
does not explicitly allocate memory in a loop nor does it explicitly allocate
large blocks of memory. Yet, the application’s memory footprint will grow as
large as 370 MB. Rarely will it run to completion; usually, it throws an out
of memory...
|
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 to the clipboard my
app will crash sometimes.
Even stranger, sometimes if I copy the map to the clipboard (and my app
doesnt crash immediately), if I then launch Word my app will spontaneously
crash!
The CopyMap function takes a parameter...
| |
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 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...
|
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 selects?
thanks...
|
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 subroutine out this module.
The code I was programming isn't related in any way with this module and I
even hadn't loaded this module into the dev. enviroment the first time the
error occured.
|
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,...
|
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...
|
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...
| |
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |