Hi
When setting siBrowseForFolder.Flags := [BrowseForComputer] and then selecting a computer, how does one access the selected 'computername'?
If this component does not do the buisness, does anyone know how else to get a computername?
Malcolm
TsiBrowseForFolder - BrowseForComputer
I suppose it would be helpful to make small fix in SiDialog.Pas file in order to get this to work. Just insert at line #1207 the following:
so the code will look like:
And use SelectedDir property to obtain name of selected computer.
Code: Select all
if FSelectedDir = '' then
FSelectedDir := lpbi.pszDisplayName;
Code: Select all
....
try
SelectedPIDL := SHBrowseForFolder(lpbi);
if FSelectedDir = '' then
FSelectedDir := lpbi.pszDisplayName;
finally
Result := SelectedPIDL <> nil;
....
There is a small problem with this patch.
Because SiDialog.pas does not clear FSelectedDir before the browse any subsequent [BrowseForComputer] call will return the result of the previous operation (FSelectedDir is not blank).
I am now clearing the .SelectedDir property in my code before making the call but I wonder whether SiDialog.pas can/should do this in this case?
Because SiDialog.pas does not clear FSelectedDir before the browse any subsequent [BrowseForComputer] call will return the result of the previous operation (FSelectedDir is not blank).
I am now clearing the .SelectedDir property in my code before making the call but I wonder whether SiDialog.pas can/should do this in this case?