Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default show icon caption bar in userform



i want to show the my icon in left of caption bar on the userform.
how to method?

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default show icon caption bar in userform

Create an image control with the icon in it and use this code

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long

Private Const WM_SET_ICON = &H80
Private Const WM_ICON_SMALL = 0&
Private Const WM_ICON_BIG = 1&

Private Sub ChangeMenuBar(frm As Object)
Dim hWnd As Long, hIcon As Long
With frm
If Val(Application.Version) = 9 Then
hWnd = FindWindow("ThunderDFrame", .Caption)
Else
hWnd = FindWindow("ThunderXFrame", .Caption)
End If
hIcon = .imgIcon.Picture.Handle
SendMessage hWnd, WM_SET_ICON, WM_ICON_BIG, ByVal hIcon
.imgIcon.Visible = False
.Show
End With
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"tom taol" wrote in message
...


i want to show the my icon in left of caption bar on the userform.
how to method?

*** Sent via Developersdex http://www.developersdex.com ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to format Userform caption? davidm Excel Programming 2 October 3rd 05 07:26 PM
Variabel and caption in userform sebastienm Excel Programming 0 September 21st 04 07:57 PM
Variabel and caption in userform Alvin Hansen[_2_] Excel Programming 0 September 21st 04 07:45 PM
UserForm Caption Soniya Excel Programming 2 October 4th 03 01:53 PM
Depress Icon Faces and not the Caption on CommandBarButton Mark[_25_] Excel Programming 1 September 29th 03 11:32 PM


All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"