Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / June 2006

Tip: Looking for answers? Try searching our database.

Change the icon for item on the solution explorer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shai - 14 Jun 2006 16:49 GMT
Hi
In VS.net 2003 or 2005 Is there a way to programmatically change icon to
item in the solution explorer?
For example if the file is read only, have Icon with "RO" on it.

TIA
Shai
"Gary Chang[MSFT]" - 15 Jun 2006 09:55 GMT
Hi Shai,

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.

Thanks for your understanding.

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 16 Jun 2006 07:25 GMT
Hi Shai,

I consulted this issue with our development guys. You can refer to the
samples for the April edition of the VSSDK. There is a project called
ProjectSubType (installed by default to C:\Program Files\Visual Studio 2005
SDK\2006.04\VisualStudioIntegration\Archive\CS_Samples\ProjectSubtype\Projec
tSubtype) which illustrates how to do this.

Specifically, you will find in the implementation of IVsHierarchy
(Project.cs) the override of the GetProperty method handles the
__VSHPROPID.VSHPROPID_IconImgList and __VSHPROPID.VSHPROPID_IconIndex cases.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Shai - 18 Jun 2006 06:40 GMT
Hi Gary !

Thanks for the info , but is this possible in vs.net 2003 or its only on
2005 ?

TIA
Shai

> Hi Shai,
>
[quoted text clipped - 19 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 20 Jun 2006 03:32 GMT
Hi Shai,

This solution only works under VS2005.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 22 Jun 2006 11:23 GMT
Hi Shai,

I got a workaround under VS2003 from our VSIP experts!

"You can do this in VS2003 as well -- project subtypes are not new in
VS2005. You just can't use MPF. You  need to have a project subtype. It's
not something you can do from an addin or a macro, for example.

I advise you not to override the VSHPROPID_IconImgList property in a
project subtype. Doing so would require you to reproduce all the icons that
you do not want to override (because you can only return one image list per
project hierarchy). Override the image list property only if you want to
override ALL icons in a project subtype. Since you seem to want to provide
an overlay to decorate existing icons, then maybe you need to do this
anyway. Definitely ask for permission before reproducing someone's art
assets in your product; you never know who owns the rights to them.

To provide overrides to just a few icons in a project flavor, here's what
you should do:

__VSHPROPID:    Return value

VSHPROPID_IconIndex:    E_NOTIMPL
VSHPROPID_OpenFolderIconIndex:    E_NOTIMPL
VSHPROPID_IconHandle:    Handle of your new icon
VSHPROPID_OpenFolderIconHandle:    Handle of your new icon in the
"expanded" state (if it has child items).

If you are just wanting to provide an overlay, then maybe someone else on
this alias knows how to customize the overlay icons (specified by the
VSHPROPID_OverlayIconIndex). "

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.