Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Designing Versatile Add/Edit Forms & Pages

Posted on 2000-02-29
6
Medium Priority
?
127 Views
Last Modified: 2012-05-04
This is more of an opinion question than a "need help" type question.  I'm new to the visual programming world and I'm beginning to learn to work with classes ... subclassing, etc.

I've noticed that Microsoft uses page frames very heavily in their applications.  Usually, they'll have a page frame with multiple pages with editable fields on each page.  They'll have one cancel and one apply button on the page frame that applies to all pages.  Each page may or may not have it's own add, remove or properties buttons.

In designing apps, is their a tendancy to create a custom page frame that includes an apply, cancel and quit button and then just hide them if you don't need them, or to create a button group of cancel, apply and quit buttons and place that button group as needed or do most folks just add those buttons individually as they need them?

If there is someone who has developed a method of implementing a "default" set of cancel, apply, quit buttons, I'd be interested in hearing how you implement a default set of buttons to work with a page frame where each page may be dealing with a different table.

I'd be interested in getting a few different opinions on this so I'm willing to give out points to more than one xpert (if I'm able to).

Thanks for the help.

Rodd
0
Comment
Question by:rharr
  • 3
  • 2
6 Comments
 

Author Comment

by:rharr
ID: 2570245
Adjusted points to 150
0
 
LVL 1

Accepted Solution

by:
PatrickVD earned 525 total points
ID: 2570306
Hi Rodd,

I think I understand what you mean when talking about the Page frames that MS uses very often...

As far as I can see, this is always the case when you are editing properties or preferences in a MS application

This is mainly how I do in my applications too... I think its a good approach for editing settings/preferences. As a matter of fact, its even quite normal that this type of dialogs include only one 'OK','Apply' and 'Cancel' button (at least in my opinion). As one might say, you apply all the property/preference changes or none of them... that's what I can understand behind the fact that only 1 set of these buttons are available....

The main advantage of this kind of approach is that it is easely extendable. If tomorrow you make a new version of your app, and you have new settings/preferences, you simply add a new tab/frame to the dialog and you don't need to implement new form handling and so on.. For the user of your application, it will be easier to find his way around in the new version, because the way of changing settings remains the same throughout the different versions...
It also allows you to group the different settings of the same category together in the same page/tab, which also will look a more natural approach for the end user....

Now, referring to your remark, that each page might be handling a different table... As far as my implementations are done, I try to encapsulate the data storage into a separate classmodule. By doing so, I can manage the state of all the settings into the same class (even if they manage different tables) because the REAL data update will only happen if the user presses 'Apply' or 'OK'. At that moment this encapsulating class will start writing the data to the different tables if needed (most often by using other instances of data classes that encapsulate the data access each to a particular table).

I hope my point of vue is of any help to you...

Patrick.

0
 
LVL 4

Expert Comment

by:PBuck
ID: 2570327
OK ... this is just a matter of opinion I am sure.  I have a form that I created a while back that uses a similiar technique (frmTemp - save name), a generic form with a few built in routines.

This form includes an OK, Cancel, and Help button, one picture box with an index of 1 (within a TabStrip Control for navigation purposes).  This way, I can copy and paste the picture box as many times as needed (within the TabStrip box) to create "pages" within this form.  Ofcourse, the Picture boxes contain frames, checkboxes, radio buttons - anything that is needed.

Just have the tabstrip hide and show the various picture boxes,by their Index number, to page through the options or what have you.  With one Global variable (I set equal to the picture box index) my generic buttons can now use a Select Case statement to perform various task (pertaining to the picture box index).

This is just one of many ways I am sure to create page frames.  I hope this becomes a little useful for you.  Good Luck!
0
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!

 

Author Comment

by:rharr
ID: 2570353
Thanks Patrick,

I understood you great until the last paragraph.  I didn't quite follow your implementation of a class module that deals with "encapsulating the data access with each particular table".  Could you give me a give me a bit of an example of what this class may be like?

Thanks, Rodd
0
 
LVL 1

Expert Comment

by:PatrickVD
ID: 2570815
Hi Rodd,

Let me try to make it clear to you...I problably didn't use the right way to express myself (english isn't my mother tongue, but i do my best!)

What I meant is that I never code the data storage VB code (ADO or something else to get the data in the database or other storage medium like Registry for example)  in the form itself.
This is always managed by a seperate class module. I actually program only UI behaviour code in the forms and everything else is encapsulated in the 'data' classmodules. This often comes to 1 data class = 1 data table.

That's actually what I meant. I hope I made it clear this way.

Cheers,

Patrick.


0
 

Author Comment

by:rharr
ID: 2572447
Thanks Patrick!

That cleared it up nicely ... and by the way, you're English was just fine!  8?)

Rodd
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

783 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