Thursday, April 21, 2005

Object Picker dialog in Delphi

I was going through thecodeproject.com, and came across an article: Using the Windows 2000/XP Object Selection Dialog. Basically, this is the dialog in Windows XP/2000 that allows you to choose users,groups and/or computers to grant (or deny) access to resources, such as files, folders, etc.

If you want to show this in your application, you can, using the IDsObjetPicker.InvokeDialog. If this looks like greek to you, simply download the JVCL and use the TJvObjectPickerDialog.

The JEDI online help for this function is sketchy. Actually it's near non-existant, but the CodeProject and MSDN references give you enough to work with.

But if you just want to see it in action, here are the steps:

  1. Drop a TJvObjectPickerDialog instance on your form.
  2. Double click the Scopes property and add a Scope.
  3. For this scope, set ScopeTypes.stTargetComputer to True, and DownLevelFiler.dlUsers to True.
  4. Right click on the TJvObjectPickerDialog and click Preview.




That should do it. JVCL is just AWESOME - there's so much in there that you can use but it's a little difficult to find. In my next few blog posts I hope to demonstrate the use of some of these components.

0 Comments:

Post a Comment

<< Home