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

x
?
Solved

Problem starting a client/server project using VB6.0

Posted on 2001-06-06
5
Medium Priority
?
237 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
  • 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 600 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

916 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