Hi i am making a C# window application, in which i have two accounts one for user, and other for admin.
How can i provide different different rights to user and admin.
Like i want that all the buttons and everything should be visible to both user and admin, but admin could edit and modify whatever he wants, but for user i want certain functions and buttons to be disabled, user could see them but could not perform any functionality.
How can i do this, can anyone help me in this?

No it is not useful for me.
I just want that all the buttons and everything should be visible to both user and admin, but admin could edit and modify whatever he wants or can use every button, but for user i want certain functions and buttons to be disabled, user could see them but could not perform any functionality.
Please somebody tell me how can i do this...............:(

heLLO CAN SOMEONE help me regarding my query.......... :(

Use Role Based Access (Not Role Based Authorization). Role-based access control attempts to allow administrators to specify access control in terms of the organizational structure of a company. You assign a user or a group of users to a role to perform a specific job function and restrict them to do certain other job functions.

Maybe this article is useful for you - http://csrc.nist.gov/groups/SNS/rbac/documents/design_implementation/Intro_role_based_access.htm and http://msdn.microsoft.com/en-us/magazine/cc163807.aspx

No adatapost this is not work too.
this artical for ASP.net, while i am using C# window application......
Can anyone help me regarding this.........

i think you need to re-read the article adatapost offered. Second paragraph clearly states

This article presents a set of interacting helper classes that enable a Windows Forms application to use the ASP.NET credentials management infrastructure, with the same ease as if it were an ASP.NET application.

Likewise, the login screen written by sknake and linked by ddanbe would allow you to authenticate the user and store his credentials. Then, when you load the form you set Button.Enabled = false; if the user is not an admin etc.

Please consider the advice carefully before dismissing it. Or if these solutions really dont fit what you need then you need to be more specific about your requirements.

This article has been dead for over six months. Start a new discussion instead.