Solved

Problem starting a client/server project using VB6.0

Posted on 2001-06-06
5
233 Views
Last Modified: 2010-05-02
Hi there.

  I am trying to start a client/Server project in which it will involve 3 different level of access - Administrator, Executive and Staff. For the time being, I will be developing this project in only one machine. This mean, that machine will act as client, server and dababase as well (in fact, if I migrate the project to the real environment, server and database will share the same machine).
  Since it involves 3 level of access, I would like the first form to be displayed to user is the one that he/she has the access right to. In this case, I understand that I will need to place an authentication process before any access to the system. Anyway, I am not sure how should I begin the design because for every level of access, I wish to have some kind like parent form that will have different menus according to the level of access. For example,

  When the adminstrator is authenticated, the form shown will be frmAdmin that includes menus like mnuUser, mnuConfiguration, mnuExit.

  Whilst, when the Executive is authenticated, the form shown will be frmExec that includes menus like mnuFile, mnuReports, mnuExit.

  And finally, when the Staff is authenticated, the form shown will be frmStaff that includes menus like mnuFile, mnuStock, mnuExit.

  frmAdmin, frmExec and frmStaff in this case should act like mdiForm in a project. But, I also understand that we can only have 1 parent form in a project. In this case, how should I deal with this?


0
Comment
Question by:lslim
[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
5 Comments
 
LVL 1

Expert Comment

by:morgan_peat
ID: 6159051
If you are using Windows NT (or a Windows environment where each user must log onto the PC) then you can use MTS to deal with security.

MTS provides an easy-to-use UI to administer security roles, and your program can check that the current user is in the correct role.

The Wrox 'Professional VB 6 MTS' book is good, by Matthew Bortniker.
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6159059
Hi!

How about doing this:

I suppose the different things the 3 different access would have would be the menus and some pictureboxes for degign if necessary.

In 1 MDI form (and you'll need only 1), dump in ALL the menus that all 3 kind of accesses would have. (I suppose you'll know what to do with the mdiChilds depending on the accesses)  Dump in also ALL the picture box controls you may want for the design.

From there, hide (set Visible property to False) any menu and/or picture box that doesnt belong to the user's kind of access.

That's it!

glass cookie : )
0
 
LVL 1

Author Comment

by:lslim
ID: 6204881
Dear glass cookie,

   But, wouldn't this method causes confuses because we have to place the controls like layer cake?
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 200 total points
ID: 6204973
Hi!

Well, not really that confusing (from the way I see it)...

Here's an example (just the programming logic):

For your MDI form, create menu1, menu2, menu3, menu4, menu5, menu6.

Menu1, menu2 - For 1st level access

Menu3, menu4 - For 2nd level access

Menu5, menu6 - For 3rd level access

Firstly, hide all menus.

Then...
If it's 1st level access, show Menu1 and Menu2.
If it's 2nd level access, show Menu3 and Menu4.
If it's 3rd level access, show Menu5 and Menu6.

That's it!

glass cookie : )
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6204977
To make life easier, (from left to right) first add all 1st level accesses, then 2nd following 3rd level accesses.
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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 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…
Suggested Courses
Course of the Month6 days, 17 hours left to enroll

623 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