HI all i m making a project in which i have added menu named Login which includes items
like login, create new user, delete user, change password etc. i want to access these items on the basis of username. e.g. if username is administrator he can access all the items but if someone else logins he must not access create new user, delete uder items.
i want to access these items from another form.
but i m unable to access these items. can anyone tell me wts the reason

You can manage enabling and disabling items according to user cerdentials, when user logins into your system get its type (Admin, user,...) and then make switch case, in case of User's type is user so CreateUser.Enable = false....

Thanx for reply Ramy but i think u didnt understand my problem. my problem is that i cant access any of the items in the menustrip. means when i type there is no option for these items. Even creating an object of the main form i m unable to do that

Dear Gaurav,

In first can you make me understand why you want to access items from another form ?

I can help you with authentaction module that render menuItems depend on the login user and every user has its privileges.

Hi,

The reason is that every time you drag and drop a control into the designer. What happends under the hood is that a private property is created(say private MenuStrip menuString1 ). just change the access modifier to public. Althoug for what I understand that you are trying to do this solution is better go to this thread and look at the post #8.

http://www.daniweb.com/forums/thread133729.html

Regards,
Camilo

This question has already been answered. Start a new discussion instead.