![]() |
|
#1
|
|||
|
|||
|
I think I finally got all of my forms completed and working properly. Now I am trying to just do some cosmetic things. Specifically, at this point, I am wanting to change the icon that shows in the taskbar for the userform. I want to change this: Into this: I've tried the following code, but have not had any success: Code:
Private Declare Function GetActiveWindow32 Lib "USER32" Alias _
"GetActiveWindow" () As Integer
Private Declare Function SendMessage32 Lib "USER32" Alias _
"SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function ExtractIcon32 Lib "SHELL32.DLL" Alias _
"ExtractIconA" (ByVal hInst As Long, _
ByVal lpszExeFileName As String, _
ByVal nIconIndex As Long) As Long
Private Sub ChangeIcon()
ChangeApplicationIcon
End Sub
Sub ChangeIcon()
Dim Icon&
Const NewIcon$ = "Image2"
Icon = ExtractIcon32(0, NewIcon, 0)
SendMessage32 GetActiveWindow32(), &H80, 1, Icon
SendMessage32 GetActiveWindow32(), &H80, 0, Icon
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OneNote Icon on Taskbar Query | kevitec57 | OneNote | 0 | 03-22-2016 06:37 AM |
| Taskbar icon always moves when saving Adobe PDF from Word | WaltR | Word | 0 | 10-03-2015 09:41 AM |
| Change parent for control from frame to userForm? | Cosmo | Word VBA | 0 | 05-30-2014 02:19 PM |
| ICONS change to a different icon | lrmaps.423 | Windows | 0 | 04-11-2014 07:53 AM |
| Change Contacts View icon folder to List | arthurshurn | Outlook | 0 | 10-29-2013 09:53 AM |