|
-
Dec 30th, 1999, 08:36 AM
#1
Thread Starter
Member
The application I am developing uses lots of masking elements, like to hide part of a textbox. Both frames and pictureboxes work, but I'm wondering which uses less memory and resources. Thanks!
------------------
Mike Wellems
PowerQuery
-
Dec 30th, 1999, 11:33 PM
#2
Guru
I found this in MSDN:
Use Image Controls Instead of Picture Box Controls
This optimization improves the speed and minimizes the size of your application; use it whenever possible. When you are simply displaying pictures and reacting to click events and mouse actions on them, use the image control instead of the picture box. Don’t use a picture box unless you need the capabilities only the picture box provides, such as graphics methods, the ability to contain other controls, or dynamic data exchange (DDE).
Comparing a picture control with a frame is kind of like comparing apples to oranges (in terms of functionality), but from the above statement, I would deduct that the frame control uses less memory because it does not provide the features that the picture box does. Features = memory
Tom
-
Dec 30th, 1999, 11:45 PM
#3
I would also say that a Frame doesn't use as much memory as a PictureBox, but don't Frame me on that.
-
Dec 31st, 1999, 01:07 AM
#4
yeah, but oranges make you pull funny faces if you eat them too fast, apples are safe!
The MSDN snippet is right, but the picture box has better "special effects"!
-
Dec 31st, 1999, 01:59 AM
#5
Thread Starter
Member
Thanks for your help. I know that about the Image being less resource-intensive than a Picturebox, but for my purposes, an Image won't work. What I need it for is to mask over part of a textbox. Try to get an image control to be "on top" of a textbox. It doesn't work, unless it's in a PictureBox or Frame. I suspect these both work because they're containers. I suspect that a frame uses less resources too, but if anyone knows any controls that can be placed over a textbox and use little memory, let me know.
------------------
Mike Wellems
PowerQuery
-
Jan 2nd, 2000, 10:24 AM
#6
Hyperactive Member
Frames are OK and safe as respect to resources usage, as long as you limit their number to say less than a thousand...
No, seriously, I don't think that a few frames can compromise your system.
-
Jan 2nd, 2000, 04:14 PM
#7
A TextBox can be put on an other TextBox. A TextBox doesn't use that much resorces (if it's not filled with 32KB of text). If you set the Enabled property to False no caret will be visible either.
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|