![]() |
File icons |
Post Reply ![]() |
Author | |
Francesca ![]() Newbie ![]() Joined: 08 June 2006 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 08 June 2006 at 6:22am |
I'm trying to add the icon related to the file extension and I'm using: Public Function GetIcon(ByVal Filename As String, ByVal iSize As IconSize) As System.Drawing.Icon Dim hImg As IntPtr Dim shinfo As New SHFileInfo ' Depending on the size, get the icon from the file If iSize = IconSize.Small Then ' Return small icon hImg = SHGetFileInfo(Filename, 0, shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON Or SHGFI_SMALLICON) ElseIf iSize = IconSize.Large Then ' Return large icon hImg = SHGetFileInfo(Filename, 0, shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON Or SHGFI_LARGEICON) End If 'The icon is returned in the hIcon member of the shinfo struct. GetIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon) End Function Add the icon but when add the icon to the report control: Dim ico As System.Drawing.Icon... rpCtrl.Icons.AddIcon(ico.Handle.ToInt32, nImageIndex, XTPImageState.xtpImageNormal) But I can't see the icon in the report control Thanks |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
What size is the icon you wish to display? Try setting the width of the column to width of icon + 1. Also be sure to have muliline True.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |