Print Page | Close Window

Why Manager.Icons doesn't return any icons?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=8887
Printed Date: 23 November 2024 at 5:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Why Manager.Icons doesn't return any icons?
Posted By: unrecognize
Subject: Why Manager.Icons doesn't return any icons?
Date Posted: 25 November 2007 at 8:20pm
Hi, currently I am developing a shortcut for my program. But when I call the manager.icons , it doesn't show any icons. May I know why? Below is my code:
 
Public Class ThisPane
    Private PaneA As PaneA = New PaneA
    Private PaneB As PaneB = New PaneB
    Private PaneC As PaneC = New PaneC
 
    Private Sub ThisPane_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CreateShortCutBar()
    End Sub
 
    Private Sub ThisPane_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        wndShortCut.SetBounds(1, 1, Me.ClientRectangle.Width - 2, Me.ClientRectangle.Height - 2)
    End Sub
 
    Private Sub createShortCutBar()
        PaneB.Visible = False
        PaneC.Visible = False

        Dim ItemA As ShortcutBarItem = wndShortCut.AddItem(ID.SHORTCUT_A, "A", PaneA.Handle.ToInt32)
        Dim ItemB As ShortcutBarItem = wndShortCut.AddItem(ID.SHORTCUT_B, "B", PaneB.Handle.ToInt32)
        Dim ItemC As ShortcutBarItem = wndShortCut.AddItem(ID.SHORTCUT_C, "C", PaneC.Handle.ToInt32)
 
        wndShortCut.Selected = ItemA
        wndShortCut.Icons = ImageManager.Icons
    End Sub
End Class
 
Thanks for help.



Replies:
Posted By: Oleg
Date Posted: 26 November 2007 at 1:07am
Hello,
Are you sure ImageManager contains icons for ID.SHORTCUT_A/B/C ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: unrecognize
Date Posted: 26 November 2007 at 4:43am

Hi oleg, thanks for the reply. I am confuse, below are my questions.

How to know that I am having the icon for A, B, C? Is it the Icon A, B, C must save into Application.StartUpPath & "\bin\Icons" ? How about the icon name? The ImageManager doesn't specify which location and file.

 
thanks.


Posted By: Oleg
Date Posted: 26 November 2007 at 10:05am
????
 
How do you load icons?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: unrecognize
Date Posted: 26 November 2007 at 9:10pm
I just call this: wndShortCut.Icons = ImageManager.Icons to load the icons. And I put my Icons file in Application.StartUpPath & "\Icons". But I create the Icons by using Windows Paint. Is it this is the problem ?


Posted By: Oleg
Date Posted: 27 November 2007 at 1:08am
but how do you load icons from Application.StartUpPath & "\Icons".  to imagemanager ?
Please follow our samples. they have everything you need.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: unrecognize
Date Posted: 30 November 2007 at 12:32am
Hi, I really don't know how u call the Icons from. I just follow your sample code which only putting down this line: wndShortCut.Icons = ImageManager.Icons    then your icons will be loaded, why?


Posted By: Oleg
Date Posted: 30 November 2007 at 1:30am
Hi,
 
Right click on ImageManager in sample and choose Properties - you will see that icons was added to ImageManager in designtime.
 
So you can add them in designtime or manually load from files to call
ImageManager.Icons.LoadBitmap or LoadIcon


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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