Solved

Problem starting a client/server project using VB6.0

Posted on 2001-06-06
5
227 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 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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