borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (package and deployemnt)Next Topic (re: data report) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Working of a Professional Form
Poster Message
ahmad
Level: Master

Registered: 03-02-2003
Posts: 120

icon Working of a Professional Form

Hi there
I want to ask all the Guys about what should be the qualities of a good easy to use and attrative form  for an end user
e.g consider this simple one
FORM
employe ID ..combo/style..0
EmployeName...(text Box)
age.....(Only no's in a text box)
Salary....(only no's is text box)
Department ..(combo linked to Dept table)

we hav add/edit/delete/clear/save buttons
(some one told me that we can use only 2buttons instead of above emntioned fout buttons .but he didnt told me how..

also we hav first-next-previous-last buttons for viewing records.
How u guys control it in diff operation like e.g one should not be able to write /change when a record is viewed for deletion purpose. etc
Also u can add anything u feel beter for this form

In short kindly write qualities of a professional form
Regards


[Edited by ahmad on 27-10-2003 at 11:48 AM GMT]

____________________________
@#@#@

27-10-2003 at 06:47 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon Re: Working of a Professional Form

Depending on the nature of your app, it would be good to do away with the Edit button and let your code tell when the user has changed anything.

For prohibiting the user from editing the form you can lock the textboxes or disable them.

Here is a small routine I always keep in a Utility.Bas module to lock any  number of controls.

Public Sub LockControls(ParamArray Ctrls() As Variant)
  On error resume next 'for controls without the locked property
  Dim ctrl as Variant
  For Each ctrl In Ctrls
    ctrl.Locked = True
  Next
End Sub


Because of the paramarray keyword, you can pass an undefined number of controls and they will all be locked for you. There must be a corresponding UnlockControls sub. You can do the same for lock and other items.

Depending on the nature of your app, 1st and stuff might not be necessary (unless your users must deal with a number of updates in a row.) I think a grid showing some details and textboxes and stuff will do good. You then fill the textboxes with the current data when the user clicks on a record in your grid.

You might want to consider a tabbed style application. Let me know if you need more info.

____________________________
My boss is a Jewish Carpenter (Jesus Christ)


Brain Bench Certified VB.NET Developer

22-11-2003 at 10:08 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Working of a Professional Form

To me, the idea of a pro app is giving users several ways to do things, like menus, keystrokes, double-clicks and context menus.

I also usually prevent user to resize SDI forms, and do a large use of tooltips, and custom icons.

I noticed also database apps usually lock the entire record for editing, and give user an Edit Mode (accessible by a button or a menu command or some other ways, e.g by clicking or double-clicking in a textbox), in which they can edit the fields in the form, and save all changes only at the end of editing. Most of controls are locked when out of Edit Mode.

And, of course, an Online Help function improves much more your app.

Hope it helps
  

____________________________
Real Programmer can count up to 1024 on his fingers

24-11-2003 at 02:55 PM
View Profile Send Email to User Show All Posts | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon Re: Working of a Professional Form

Other things to consider

-uniform size dialogs
-add a status bar and then enter a command description for the menu items when the user points to them - see http://www.andreavb.com/forum/news/viewtopic.php?TopicID=1309
-If you include a status bar - let it tell the user what is going on all the time instead of just saying "Ready"
-no message boxes. NONE
-I guess the most obvious and important handle all errors/exceptions so that your app doesn't end with a technical message that will leave your users confused.


____________________________
My boss is a Jewish Carpenter (Jesus Christ)


Brain Bench Certified VB.NET Developer

26-11-2003 at 10:13 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Working of a Professional Form

No message boxes fabulous? Hmm... yet to see any app without message boxes...

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

26-11-2003 at 11:12 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon Re: Working of a Professional Form

quote:
JLRodgers wrote:
No message boxes fabulous? Hmm... yet to see any app without message boxes...


By no message boxes I meant error messages. To really write a good app I believe all errors/exceptions must be handled properly with a counterplan in case something goes wrong. For instance where your program uses a .ini file and the file goes missing, do not bother the user with a cryptic "File not found" message, but one should have a strategy to restore it or use reasonable defaults without crashing the system or confusing the user.  Error messages are useful when the monitor catches fire otherwise I think they should be avoided.

____________________________
My boss is a Jewish Carpenter (Jesus Christ)


Brain Bench Certified VB.NET Developer
27-11-2003 at 12:53 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Working of a Professional Form

Oh ok. I was wondering there.

I have one app that an "error" message is really good:
"Database is missing, do you wish to create it?" & _
"(If this is the first run, or you have deleted it, click yes).

It pops up at the very start (splash screen) - if they don't create it, the program terminates. While it could just create it, that could cause problems, since it can also connect to a remote db.



____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

27-11-2003 at 08:51 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon Re: Working of a Professional Form

Another thing to consider is automatic resizing of controls on forms that can be resized. By default VB does not do this so you end up with your controls bunched up at the top left of your form while the form covers the whole screen.

From the top of my head I can come up with 2 types of resizing which are (1) Proportional and (2) Rule based resizing.

Proportional ensures that your controls maintain the proportions you gave them at design time. For instance, If you have 2 textboxes side-by-side that each take up half the form's client width (excluding the space at the sides and between them), proportional resizing ensures that they will maintain this size ratio no matter how your user resizes the form and even when the resolution is changed.

Rule based involves enforcing rules that the controls should follow at run time. It doesn't really matter how the controls are positioned at design time because it is the runtime rules that determine their size and position. What do I mean? What I mean is this, one rule is that a textbox Text1 must always span the entire width of the form. Another rule is that a command button Command1 must always be right aligned to Text1. So at run time Text1 is resized and positioned so that it spans the whole width. Command1 on the other hand is then moved so that its right is inline with Text11's right.

Your form will look neat in both cases now matter what your user does. Of course it is advisable to enforce a minimum size for your form (not covered here). You might think this could take up some code and it does but I have uploaded a small project with a class that you can use for rule based resizing. Simply create an instance of the class in your form and give it the rules you want it to enforce. Afterwards, all you worry about is what your app has to do. The class resizes and repositions your controls with no code on your part. Pretty neat utility to have around. You can download it here http://www.andreavb.com/forum/database/index.php?action=showmod&mod=55. Try it out and let me know what you think.

____________________________
My boss is a Jewish Carpenter (Jesus Christ)


Brain Bench Certified VB.NET Developer

17-12-2003 at 12:56 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Working of a Professional Form
Previous Topic (package and deployemnt)Next Topic (re: data report) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder