Print Page | Close Window

How to I add pictures to the shortcut bar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3513
Printed Date: 17 November 2024 at 11:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to I add pictures to the shortcut bar
Posted By: chance1166
Subject: How to I add pictures to the shortcut bar
Date 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.

 




Replies:
Posted By: SuperMario
Date 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



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