Why Manager.Icons doesn't return any icons? |
Post Reply |
Author | |
unrecognize
Newbie Joined: 22 November 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Are you sure ImageManager contains icons for ID.SHORTCUT_A/B/C ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
unrecognize
Newbie Joined: 22 November 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
????
How do you load icons?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
unrecognize
Newbie Joined: 22 November 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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 ?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
unrecognize
Newbie Joined: 22 November 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |