Hey, I have a custom visio tool bar and i have created a custom .ico file that i want displayed on it
the ToolBarItem class has a .IconFileName method that supports a string file path and loads the icon just fine. However, due to deployment issues i would like to have the file loaded from a resource file (.res). I tried this:
the code runs fine without erroring, but the icon just shows up as a black square! Also the root directory is obviously a bad place to save the icon to and load it, how would i go about accessing a folder under the application path? Is there a better way to do this without saving and loading a file? any help would be wonderful, thanks!VB Code:
Dim oToolBarItem as ToolBarItem Set oToolBarItem = oToolBarItems.Add With oToolBarItem 'bunch of other stuff, then: Dim pic As IPictureDisp Set pic = LoadResPicture("ALERT", 1) SavePicture pic, "C:\ALERT.ICO" .IconFileName "C:\ALERT.ICO"




Reply With Quote