Solved

Designing Versatile Add/Edit Forms & Pages

Posted on 2000-02-29
6
120 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 175 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 64
Vb.net 2008 2 56
Visual Studio 2005 text editor 10 35
I need help embedding an image as HTML in my vb.net application 3 45
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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now