Solved

Designing Versatile Add/Edit Forms & Pages

Posted on 2000-02-29
6
119 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

744 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

13 Experts available now in Live!

Get 1:1 Help Now