Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - How to I add pictures to the shortcut bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to I add pictures to the shortcut bar

 Post Reply Post Reply
Author
Message
chance1166 View Drop Down
Newbie
Newbie


Joined: 13 January 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote chance1166 Quote  Post ReplyReply Direct Link To This Post Topic: How to I add pictures to the shortcut bar
    Posted: 15 January 2006 at 3:28am

I know there must be an easy way to do this but the code examples I've tried don't seem to be working. Can someone provide a programmatic example.

Thanks,
chance.

 

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2006 at 8:03am
I think you should be able to figure it out with the code below.  Note that the images are contained in a single bmp file.  This code is in the Outlook 2003 sample.

Dim mailIconArray(0 To 9) As Long


Private Sub Form_Load()


Dim mailIconArray(0 To 9) As Long
    mailIconArray(0) = SHORTCUT_INBOX
    mailIconArray(1) = SHORTCUT_CALENDAR
    mailIconArray(2) = SHORTCUT_CONTACTS
    mailIconArray(3) = SHORTCUT_TASKS
    mailIconArray(4) = SHORTCUT_NOTES
    mailIconArray(5) = SHORTCUT_FOLDER_LIST
    mailIconArray(6) = SHORTCUT_SHORTCUTS
    mailIconArray(7) = SHORTCUT_JOURNAL
    mailIconArray(8) = SHORTCUT_SHOW_MORE
    mailIconArray(9) = SHORTCUT_SHOW_FEWER
    
   
    If Not frmMain.ImageManager.IsAlphaIconsSupported Then
        wndShortcutBar.Icons.LoadBitmap App.Path & "\Icons\mail_16x16.bmp", mailIconArray, xtpImageNormal
        wndShortcutBar.Icons.LoadBitmap App.Path & "\Icons\mail_24x24.bmp", mailIconArray, xtpImageNormal
    Else
        wndShortcutBar.Icons.LoadBitmap App.Path & "\Icons\mail_Alpha_16x16.bmp", mailIconArray, xtpImageNormal
        wndShortcutBar.Icons.LoadBitmap App.Path & "\Icons\mail_Alpha_24x24.bmp", mailIconArray, xtpImageNormal
    End If
  
    CreateShortcutBar
   
    wndShortcutBar.ExpandedLinesCount = 5
End Sub

Sub CreateShortcutBar()

    Dim Item As ShortcutBarItem, ItemMail As ShortcutBarItem
   
    Load frmPaneMail
    Load frmPaneCalendar
    Load frmPaneContacts
   
    Set ItemMail = wndShortcutBar.AddItem(SHORTCUT_INBOX, "Inbox", frmPaneMail.hWnd)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_CALENDAR, "Calendar", frmPaneCalendar.hWnd)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_CONTACTS, "Contacts", frmPaneContacts.hWnd)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_TASKS, "Tasks", 0)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_NOTES, "Notes", 0)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_FOLDER_LIST, "Folder List", 0)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_SHORTCUTS, "Shortcuts", 0)
    Set Item = wndShortcutBar.AddItem(SHORTCUT_JOURNAL, "Journal", 0)
   
    wndShortcutBar.Selected = ItemMail
          
End Sub
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.