PC Review


Reply
Thread Tools Rate Thread

How can I change xls file icons?

 
 
Paul in Houston TX
Guest
Posts: n/a
 
      26th Dec 2011
How can I change xls file icons?
Excel 2003, Windows 7
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      27th Dec 2011
Paul in Houston TX pretended :
> How can I change xls file icons?
> Excel 2003, Windows 7


If you are trying to 'hide' xls files so they don't show up in Windows
Explorer or browse dialogs as Excel file, just change the extension to
something that refs to your project name. Note that file extensions can
be longer than 3 characters.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      27th Dec 2011
On Mon, 26 Dec 2011 15:51:42 -0600, Paul in Houston TX wrote in
microsoft.public.excel:

>How can I change xls file icons?
>Excel 2003, Windows 7


Have you tried changing the relevant entry in the registry?

Find HKEY_CLASSES_ROOT\.xls ; note its "(Default)" value (here, it's
Excel.Sheet.8 ). Find that key (HKEY_CLASSES_ROOT\Excel.Sheet.8) and the
key DefaultIcon below that; note its value (here:
C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\xlicons.exe,1);
change it.

--
Michael Bednarek "ONWARD"
 
Reply With Quote
 
Paul in Houston TX
Guest
Posts: n/a
 
      27th Dec 2011
Michael Bednarek wrote:
> On Mon, 26 Dec 2011 15:51:42 -0600, Paul in Houston TX wrote in
> microsoft.public.excel:
>
>> How can I change xls file icons?
>> Excel 2003, Windows 7

>
> Have you tried changing the relevant entry in the registry?
>
> Find HKEY_CLASSES_ROOT\.xls ; note its "(Default)" value (here, it's
> Excel.Sheet.8 ). Find that key (HKEY_CLASSES_ROOT\Excel.Sheet.8) and the
> key DefaultIcon below that; note its value (here:
> C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\xlicons.exe,1);
> change it.
>

Thanks! I had tried that last week to no avail.
Used ResHacker to view the icons in xlicons.exe.
It turns out that I had to add the UserChoice key to
the registry, also, or it would not take.
It seems to be working now.
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Dec 2011
On Dec 26, 11:00*pm, Paul in Houston TX <P...@Houston.com> wrote:
> Michael Bednarek wrote:
> > On Mon, 26 Dec 2011 15:51:42 -0600, Paul in Houston TX wrote in
> > microsoft.public.excel:

>
> >> How can I change xls file icons?
> >> Excel 2003, Windows 7

>
> > Have you tried changing the relevant entry in the registry?

>
> > Find HKEY_CLASSES_ROOT\.xls ; note its "(Default)" value (here, it's
> > Excel.Sheet.8 ). Find that key (HKEY_CLASSES_ROOT\Excel.Sheet.8) and the
> > key DefaultIcon below that; note its value (here:
> > C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\xlicons.exe,1);
> > change it.

>
> Thanks! *I had tried that last week to no avail.
> Used ResHacker to view the icons in xlicons.exe.
> It turns out that I had to add the UserChoice key to
> the registry, also, or it would not take.
> It seems to be working now. *


I have not checked this buy you may?? be violating your user agreement.
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      27th Dec 2011
> I have not checked this buy you may?? be violating your user agreement.

I believe you are correct as the target keys are part of MSO's
installed structure, and is covered by the rather lengthy EULA (which
nobody ever bothers to actually read during install<g>). That's why I
simply change the file extensions of project files when/if desired!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      27th Dec 2011
hi Paul,

Option Explicit

Const FichierIco As String = "Logo.ico"

Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function GetClassLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetClassLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Declare Function LoadImageA Lib "user32" _
(ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, _
ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long


Dim HIcon As Long, hWnd As Long


Sub Restore_Ico()
If HIcon Then SetClassLongA hWnd, -14, HIcon
End Sub

Sub Modify_Ico()
Dim FIcone As String

' Adapt the file path
FIcone = "C:\Documents and Settings\Administrateur\Mes documents\alarme.ico"

If Dir$(FIcone) <> "" Then
hWnd = FindWindowA(vbNullString, Application.Caption)
HIcon = GetClassLongA(hWnd, -14)
SetClassLongA hWnd, -14, LoadImageA(0, FIcone, 1, 0, 0, &H10)
End If
End Sub


--
isabelle


Le 2011-12-26 16:51, Paul in Houston TX a écrit :
> How can I change xls file icons?
> Excel 2003, Windows 7

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.