[futurebasic] Re: [FB] Use Custom Icon

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 1999 : Group Archive : Group : All Groups

From: Morrison SoftDesign <info@...>
Date: Wed, 27 Jan 1999 09:10:23 -0500

Sylvain Guillemette wrote:
> 
> Hi,
> 
> I need help please,
> 
> I want to set the Finder Flag 'Use Custom Icon' for
> a file or an application. (within FB)
> 
> How can i set this flag ?
> 
> After 2 hours of searching my zip disk's for hints,
> i've found no related infos.
> 
> Thanks,
> 
> Sylvain


Use this:


 _useCustomIcon = &x0000010000000000

CLEAR LOCAL
LOCAL FN setFileBit (fileName$,volNum%, theBit&)
  DIM pbBlk.80
  DIM osErr%
  
  pbBlk.ioNamePtr& = @fileName$
  pbBlk.ioVRefNum% = volNum%
  osErr% = FN GETFILEINFO (@pbBlk)
  pbBlk.ioFinderInfo.fdFlags% = (pbBlk.ioFinderInfo.fdFlags% OR theBit&)
  osErr% = FN SETFILEINFO (@pbBlk)
END FN = osErr%

fileName$ = FILES$(_fOpen,,,volNum%)

LONG IF LEN(fileName$)
  FN setFileBit (fileName$,volNum%, _useCustomIcon)
END IF


John


-- 
Professional Font Software Utilities...

Morrison SoftDesign
http://www.MorrisonSoftDesign.com
1-800-583-2917