|
-
Mar 27th, 2012, 10:10 PM
#1
Thread Starter
Frenzied Member
One tooltip for Control Array; Not one for each control?
I have an application with as many as 625 Textboxes in a runtime generated control array.
I add textboxes one at a time in a subroutine.
The application ran with no problems until the parameters required more than 256 textboxes at which point it slowed drastically as textboxes were added. At circa 400 Textboxes it died with an out-of-memory condiiton.
The system has 8GB & a 64Bit version of Windows 7.
It looks like the tooltips are eating up memory, causing excessive use of virtual memory from Hard Disk & finally causing out-of-memory.
I am now running the application with a label which flashes when the mouse hovers. This uses the Handler for MouseHover.
Is it possible to get a single Tooltip to function for all the Controls in an Array? I would prefer this to using the Event Handler.
Thanx for any advice somebody can provide.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Mar 27th, 2012, 10:29 PM
#2
Re: One tooltip for Control Array; Not one for each control?
Why would you ever need so many textboxes on one single form? Why not use a grid control or something similar instead?
-
Mar 27th, 2012, 10:32 PM
#3
Re: One tooltip for Control Array; Not one for each control?
If you only want one ToolTip then only create one ToolTip. That's all there is to it. You can even add the ToolTip in the designer. In fact, you should never use more then one ToolTip per form unless you want different appearance and/or behaviour. If all you want is different text then you should always be using just one ToolTip no matter what.
-
Mar 27th, 2012, 11:28 PM
#4
Thread Starter
Frenzied Member
Re: One tooltip for Control Array; Not one for each control?
Joacim Andersson: I decided it would be fun to create a Project which filled in Magic Squares & provided tools making it convenient for a User to generate various special Magic Squares.
It seemed handy to use a Scroll Bar to specify the size of the square from 3*3 to 25*25
When the Scroll bar is moved, the code creates the appropriate array of either Labels (for program-generated squares) or Textboxes for User entry of values.
If you have a suggestion for some mechanism other than a control array, I would be glad to consider it.
BTW: I find it handy to use a Scroll Bar and a Label for User input of values which must be integers: Order of a polynomial, size of Magic Square, et cetera.
No need to parse Textbox entries.
User is not bothered with Msgbox error notices about invalid input. It always seemed best to me to make it impossbile for user to specify invalid input, when there was a way to prevent such data entry.
I am a retired mainframe programmer who was paid to pursue a hobby for circa 50 years. Now I write programs for amusement: Magic Squares, Torus Geodesics, Fractal graphics, whatever.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
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
|