|
-
Jun 11th, 2008, 07:33 AM
#1
Thread Starter
^:^...ANGEL...^:^
Show the Window's "Select User or Group" dialog box
Hi,
Does anyone knows how to display the Window's "Select User or Group" dialog box through C# or VB.NET and then retrieve whatever value it returns upon pressing the OK button?
You can normally see this dialog through many places and most common being,
* Open Windows Explorer
* Locate any folder
* Right click on the folder and click properties
* Go to the "Security" tab and click on the "Advanced" button at the bottom right of the dialog
* There you can see the "Add", "Edit", "Remove" buttons for mucking around with permissions
* Click on the "Add" button
Now that will bring on the dialog I am after. I need to show that dialog via code and when the user press OK after selecting a user or group I need to retrieve what that value it.
What I have is an application where a user's fully qualified domain name is stored in the SQL Server database where it's used throughout for auditing purposes and also defining our own set of security on the program which isn't always possible even by grouping users at the domain level.
Is this possible?
Cheers
-
Jun 11th, 2008, 08:33 PM
#2
Thread Starter
^:^...ANGEL...^:^
Re: Show the Window's "Select User or Group" dialog box
Not to be noisy but *BUMP*
-
Jun 11th, 2008, 10:00 PM
#3
Re: Show the Window's "Select User or Group" dialog box
Even if you can display the dialogue, getting the user's selection would not be easy. I'd think it would be a better idea to just create your own dialogue.
-
Jun 11th, 2008, 10:52 PM
#4
Thread Starter
^:^...ANGEL...^:^
Re: Show the Window's "Select User or Group" dialog box
Thanks J.
Yeah I thought about it and doing that would be easy, I just thought if I am using the inbuilt functionality of Windows then I don't have to worry about updating anycode when I am moving from Win2000 -> XP -> Vista (assuming the core APIs are same).
I am still keeping my option open by invoking the OS dialog and will see if I can find a solution. When I do I will reply to this post so can be useful to others.
Cheers
-
Jun 11th, 2008, 11:05 PM
#5
Re: Show the Window's "Select User or Group" dialog box
In actual fact there's every possibility that the functionality would change betweeb XP and Vista. If you access AD via .NET then you are assured that it will work for all OSes.
-
Jun 11th, 2008, 11:15 PM
#6
Thread Starter
^:^...ANGEL...^:^
Re: Show the Window's "Select User or Group" dialog box
 Originally Posted by jmcilhinney
In actual fact there's every possibility that the functionality would change betweeb XP and Vista. If you access AD via .NET then you are assured that it will work for all OSes.
Absolutely on the mark John.
Yes I know that there is a real high chance of things changing between XP and Vista, what I meant to say was if I use .NET way which internally might be using one of the OS APIs but so long the .NET Framework is updated, it would know how to take care of OS differences.
So yes I am looking for a .NET way of achieving this.
-
Jun 11th, 2008, 11:23 PM
#7
Re: Show the Window's "Select User or Group" dialog box
As I said, you should use AD. That's ActiveDirectory, for which the Framework provides an API. You can get a list of users and groups from AD and display them in your own dialogue.
-
Jun 11th, 2008, 11:27 PM
#8
Thread Starter
^:^...ANGEL...^:^
Re: Show the Window's "Select User or Group" dialog box
Yes thanks John. I am already coding to achieve this using active directory APIs included in .NET Framework.
Just keeping an option open on achieving my main goal using the .NET Framework, if possible ofcourse.
Thanks for the suggestions and input mate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|