Desk top icons - ID/Name

Microsoft OFFICE

    Sponsored Links

    Next

  • 1. Question - Backward compatibility in Office developing
    Hi, I have a project that automates Excel, and I make a reference to the Excel library installed on my computer - Excel XP. I would like my project to support older versions of Excel but if someone doesn't have Excel XP it probably won't work. Is there a way other than late-binding? (i.e. dim myexcel as Object: set myexcel = CreateObject("Excel.Application") ) Please post an answer! Thanks in advance!
  • 2. Question - Backward compatiblity in Office developing
    Hi, I have a project that automates Excel, and I make a reference to the Excel library installed on my computer - Excel XP. I would like my project to support older versions of Excel but if someone doesn't have Excel XP it probably won't work. Is there a way other than late-binding? (i.e. dim myexcel as Object: set myexcel = CreateObject("Excel.Application") ) Please post an answer! Thanks in advance!
  • 3. how to access complex datatypes/classes in VBA?
    Hello, i'm trying to fill a complex struct with data, but it isn't working at all.. the struct: Public request_uri As String '"content" is an array with elements defined as struct_Structcontentitem Public content As Variant Content struct.. Public sys_name As String Public sys_page As String Public sys_template As String Public table As String '"fieldKV" is an array with elements defined as struct_StructfieldKV Public fieldKV As Variant I want to access the sys_template property of content(0), but this isn't working.. Sub vulcomplex() Dim a As New struct_StructmdataKVpage a.content(0).sys_template = "1" End Sub If someone could help me with this, i would be very grateful, greetings, Marco
  • 4. Outlook Out of Office
    Hi, I need an VB-Programm, which asks the Exchange-Server, if an user has activated his Out-Of-Office-Message. Can anybody help me ? greetings, Peter
  • 5. Missing Reference when moved to XP Machine
    I have an Access application that was created way back when..(I inherited it).. it has been working on a 98 machine. In the app there is reference to "msiSys OLE Control Module" that is selected. When this application is moved to a WinXP machine this reference seems to be missing. I have unselected the reference but that causes the app to cause errors. Any idea how I can get this reference on an XP machine?? It's the only one missing... Thanks, Matt

Desk top icons - ID/Name

Postby TGVz » Fri, 13 Jul 2007 01:30:03 GMT

Good day, i do not know if this is the right forum but does anybody know if 
it is possible to to get the id/names of the icons in the "SHELL32.dll" and 
can one use them from applications such as Excel in VBA ??
-- 
Les

Re: Desk top icons - ID/Name

Postby zz » Mon, 16 Jul 2007 02:57:50 GMT

create a new workbook

Alt+F11 to open the visual basic editor

menu insert ->Userform

copy and paste this code into the userform


play with this part of the code  changing the index number to change the 
icon,



  >  hIcon = ExtractIcon(0, "SHELL32.DLL", 165)<-- just change the 165 part 
of this call

enjoy!




Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal 
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" 
(ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As 
Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" 
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal 
lParam As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" 
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" 
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" 
(ByVal hWnd As Long, ByVal lpString As String) As Long


Private Sub UserForm_Initialize()

    Dim hWnd, eWnd As Long
    Dim hIcon As Long
    Dim f_style As Long

    'Form window
    hWnd = FindWindow("ThunderDFrame", Me.Caption)

    'Application window
    eWnd = FindWindow("XLMAIN", Application.Caption)

    'Grab the icon from shell32.dll...
    hIcon = ExtractIcon(0, "SHELL32.DLL", 165)

    'draw the icon
    SendMessage hWnd, &H80, True, hIcon
    SendMessage hWnd, &H80, False, hIcon

    'Form caption
    Me.Caption = "Excel form with Icon"

    f_style = GetWindowLong(hWnd, -16)
    f_style = f_style Or &H30000    'system toolbox
    f_style = f_style Or &H20000    'minimize
    f_style = f_style Or &H10000    'maximize

    SetWindowLong hWnd, -16, f_style

    'Application caption
    SetWindowText eWnd, "test123"


End Sub


-- 
-- 






| Good day, i do not know if this is the right forum but does anybody know 
if
| it is possible to to get the id/names of the icons in the "SHELL32.dll" 
and
| can one use them from applications such as Excel in VBA ??
| -- 
| Les 



Similar Threads:

1.Dropping folder on desk top icon

Normally I have some idea of where in the MSDN to start looking but on this
one I have absolutely no idea.

A fellow who uses my 'toy' asked if would be possible to drop a folder of
files / folders to be processed onto the desktop icon ( well, of course it
would ;) ) My question is how do I detect that in a vb 2005 program??

//al

(( Cor, I'm working of the question .... ))

2.how do i get word + excell icons to desk top

can you please help

3.removing outlook icon from desk top?

       I would like to remove the outlook  icon from my desk top. When I try 
I get a message " ARE you sure you want to delete the outlook icon from your 
desktop? The outlook desktop icon provides special functionality and we 
recommend you do not remove it".
      I would like to remove it  with out loosing the aditional 
functionality. And or does anyone know what exactly those features are  that 
would be lost if I do?

4.restore my outlook icon to my desk top

I can see my outlook folders in explorer but I am not sure where the icon on 
my desktop went.  Therefore, I cannot confirm if outlook is functioning on my 
system.  I am currently using comcast's email but I really would prefer to 
use Outlook.  Do you have any suggestions about what I can do to resolve 
this?  Thanks in advance.

Susan Ramsdell

5.~ icon on desk top

The ~ file is a bug in a recent OE update.
> It's the backup of the Address Book that should have 
been named *.wa~ and
> placed in the same Windows folder as your *.wab Address 
Book file.
>


Is there a fix for this problem??  

Pete

6. ~ icon being placed on my desk top

7. Desk top Icons

8. Outlook Express places new icon on Desk Top.



Return to Microsoft OFFICE

 

Who is online

Users browsing this forum: No registered users and 25 guest