Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Specify a custom thumbnail for a normal item.

 
Subscribe to the RSS feed for this forum  Forum Index -> FileView ActiveX Control
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Sun Sep 09, 2007 5:12 am    Post subject: HOWTO: Specify a custom thumbnail for a normal item.

To specify a custom thumbnail to a normal item( that is, an item belonging to the shell's namespace and not added to FileView using AddCustomItem), use the following code in the OnAfterItemAdd event of FileView

[VB]

Private Sub FileView1_OnAfterItemAdd(ByVal Item As FileViewControl.IListItem)

' Only change icon index if FileView is in thumbnail mode
If FileView1.ViewStyle = Thumbnails Then

' Replace following condition with your own condition

' Only display a custom thumbnail for folders
If Item.IsFolder Then

Dim index As Integer

' Add a custom thumbnail to the thumbnail imagelist of FileView
index = FileView1.AddCustomIcon2("C:\my_thumbnail.bmp", Nothing, FIVILThumbnailsFramed)

' Change the iconindex of the item to that returned by the previous method
Item.IconIndex = index

End If

End If

End Sub
Back to top
Display posts from previous:   
Forum Index -> FileView ActiveX Control All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group