Solved

Structuring a VB5 app: user controls or setparent?

Posted on 1998-08-06
5
156 Views
Last Modified: 2010-04-30
Hi,

I'm an intermediate VB programmer building an app that will useapex  truegrids. I need an insight or two as to the best way to build a commercial compiled single user VB5 app which uses 5 truegrids. The 5 grids will be displayed on 4 tabs (farpoint's tab pro 2.0). They display different collections of records housed in one access database and accessed via DAO 3.5. they will show cities and hotels. Users will need to see three of the grids (on tabs 1 & 2) very often, and grids 4 &  5 once in a while.

One of my major concerns is to keep the app as responsive and fast as possible. Rather than just have all controls (including the grids) on each tab (ending up with one very large form) always loaded, I want to load into memory only those portions of the app the user needs, when they need them, then unload them.

Which of these approaches would you recommend?

1. Create the grid as a single activex usercontrol and set its appearance and data each time its instanced,
2. Put each grid into its own form and its own vb.dll and Setparent it to my main form as it is accessed,
3. do a control array of the grids,

I'd very much appreciate some guidance here.
0
Comment
Question by:cellphone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
BlackAndWhite earned 200 total points
ID: 1468129
'Setparent' the grid is going to cause lot of headaches as I have known especially when are doing it from a different form.  The positioning has to be taken care of and it is messy at times.

If I were you I would use a control array and refresh the grids as and when needed ie. when the user tabs into that tab if it is too memory consuming.  

If it is going to display 5 records each in each tab, I would rather have separate grids on each tab and not worry about the form being in memory.

0
 

Author Comment

by:cellphone
ID: 1468130
what about putting the grid into a usercontrol and instancing it as the user enters a given tab? If I use 5 instances of the usercontrol do I end up with the grid in memory 5 times or once? Thanks
0
 
LVL 1

Expert Comment

by:BlackAndWhite
ID: 1468131
Are you saying that you want to put layer on top of the grid and provide a property and method interface to the underlying grid.  Thats tough and it wouldn't serve the purpose.  It would only increase the amount of memory needed.
0
 

Author Comment

by:cellphone
ID: 1468132
what about putting the grid into a usercontrol and instancing it as the user enters a given tab? If I use 5 instances of the usercontrol do I end up with the grid in memory 5 times or once? Thanks
0
 
LVL 1

Expert Comment

by:BlackAndWhite
ID: 1468133
You mean you are going to create a usercontrol with the grid as a component inside it... Did you know that you had to write all the code to give the user access to all the properties and methods that the grid itself supported.  Some of it may noteven be accessible to you if you try to do it because of design and run time regulations that the grid has imposed.  

To your question, 'Yes it is more memory consuming and very very tedious'.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question