Print Page | Close Window

How can i show icon of image manager in messagebar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17958
Printed Date: 06 October 2024 at 2:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can i show icon of image manager in messagebar
Posted By: unforgiven
Subject: How can i show icon of image manager in messagebar
Date Posted: 25 February 2011 at 3:38am

Hi developers

I'm gooing to put icon in messagebar,but i coulden't do it yet. i took a look in sample code , but i didn't know how can i use icon such as this sample code, 

I used this code :

Dim MessageBar As MessageBar
Set MessageBar = CommandBars.MessageBar
MessageBar.Visible = True
MessageBar.Message = _
"<StackPanel Orientation='Horizontal'>" & _
" <Image Source='32988'/>" & _
" <TextBlock Padding='3, 0, 0, 0' VerticalAlignment='Center' ><Bold>Security Warning</Bold></TextBlock>" & _
" <TextBlock Padding='10, 0, 0, 0' VerticalAlignment='Center'>Certain content has been disabled.</TextBlock>" & _
"

i want to use icon in image manager and show it in messagebar

please show me how can i use icon of image manager and show this icon on messagebar

thank's all 




Replies:
Posted By: Xander75
Date Posted: 25 February 2011 at 4:42am
Hi,

Use the following code:


    Dim MessageBar As MessageBar
    Set MessageBar = CommandBars.MessageBar
    CommandBars.GlobalSettings.Icons.AddIcons ImageManager.Icons


That will allow your MessageBar to be associated with the ImageManager so your image with id 32988 will be shown.

-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: unforgiven
Date Posted: 27 February 2011 at 1:00am

Hi again Xander75

thank you so much , your code help me to develope my prog.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net