Button2 (SDF) alternatives

  • Thread starter Thread starter wendelborg
  • Start date Start date
W

wendelborg

The company I'm working for is currently developing a larger
WM5.0-application which uses the Button2 control from OpenNETCF rather
extensively.

Unfortunately the button itself takes up a good chunk of memory, and we
wonder if there are any memory efficient alternatives. An alternative
must contain the image, background image and text align properties.

Any help would be greatly appreciated

Best regards
Tommy Wendelborg
 
The Button2 control doesn't take a lot of memory by itself. It just draws the
images you asign ot its properties. So, unless you reduce the image sizes,
there's no alternative. How many buttons do you have in your project?
 
The Button2 control doesn't take a lot of memory by itself. It just draws the
images you asign ot its properties. So, unless you reduce the image sizes,
there's no alternative. How many buttons do you have in your project?

We have approximately 100 buttons in the project. We also did a quick
and simple memory usage test loading different kinds of buttons:

A) 10 empty forms
B) 10 forms w/4 OpenNet buttons, with background images
C) 10 forms w/4 OpenNet buttons, without background images
D) 10 forms w/4 standard cf buttons

Before loading After loading Difference
A 25.64 25.65 0.01
B 26.64 31.72 5.08
C 26.48 29.84 3.36
D 26.95 27.07 0.12

The numbers were found with SOTI PocketController's System Information
tool and describe physical memory used in MBs. The device was soft
reset between each test.

Even though background images can be blamed for a lot of the drag, it
seems to us like the button itself is quite heavy.
 
100 buttons? You seriosly need to think about redesigning your application.
Even for a destop application it would be too much.
 
I had a similar problem with over 80 buttons on a screen. Some of the
issues included memory usage, application speed and redraw rate.

To solve the problem I replaced the buttons with a giant picture box.
I made my UI look like a giant graphic. Then I wrote the
PictureBox.Click to determine which button was pressed.

Yes you can redraw only sections to make it look like the button was
pressed and the performance is pretty good. There shouldn't be any
flicker and other display issues.

--
I hope this helps

--
Norman Rericha
Senior Software Engineer
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
 
Hehe,

I can't say the answer was unexpected. The application is very big,
maybe too big, but it follows a natural workflow for the operators.
Believe me, it does not look like the buttons have had a hostile
takeover.

Back to the memory usage, it seems to us like the memory usage
increases with the size of the buttons even when there is no background
images. We haven't tested this thoroughly, but do you know any reasons
why this could happen?






Alex skrev:
 
Back
Top