TRzShellTree - Hide DVD Drive

Components on the Raize Shell palette: shell trees, shell lists, open/save dialogs, select folder dialog, etc.

TRzShellTree - Hide DVD Drive

Postby ColinCreed » Tue Feb 14, 2017 8:39 pm

I have an application where I am using TRzShellTree from Raize Components with Delphi XE 10 Seattle.

I want to hide any CD/DVD drives (prevent them from showing in the list of drives, etc. - is there a way to do this?
ColinCreed
 
Posts: 3
Joined:
Wed Feb 08, 2017 9:04 am

Re: TRzShellTree - Hide DVD Drive

Postby Raize Support » Tue Feb 14, 2017 11:49 pm

Hi,

You could do the following:

Code: Select all
uses
  RzShellUtils;

procedure TForm16.RzShellTree1AddItem(Sender: TObject; ParentIShf: IShellFolder_NRC;
  ParentAbsIdList, ItemRelIdList: PItemIDList; Attribs: Integer; var AllowAdd: LongBool);
begin
  AllowAdd := ( Attribs and SFGAO_REMOVABLE ) = 0;
end;


Please note that you'll need to add the RzShellIntf and Winapi.ShlObj units to the uses clause of the interface section of your form file.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm

Re: TRzShellTree - Hide DVD Drive

Postby ColinCreed » Wed Feb 15, 2017 8:41 am

Brilliant- many thanks.

On a different note, I find that when using the Help which comes with Raize Components, I get an error to the effect that the page cannot be displayed when clicking on a number of properties of TRzShellTree and other components.

Also when clicking on Events in Help there is no information.

Is there a way to fix this?
ColinCreed
 
Posts: 3
Joined:
Wed Feb 08, 2017 9:04 am

Re: TRzShellTree - Hide DVD Drive

Postby Raize Support » Wed Feb 15, 2017 4:52 pm

What are some of the properties that are causing problems? I am wondering if they are properties defined by the component or if they are inherited properties. For inherited properties the intent is to show the base VCL help, but the help interface has changed in recent versions and that may be causing the problem.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm

Re: TRzShellTree - Hide DVD Drive

Postby ColinCreed » Sat Feb 18, 2017 8:29 pm

It seems that the problem is with inherited properties and your explanation is probably correct.

I can live with it - just look up the property in the VCL help.

Thanks again.
ColinCreed
 
Posts: 3
Joined:
Wed Feb 08, 2017 9:04 am


Return to Shell

Who is online

Users browsing this forum: No registered users and 1 guest

cron