I'm trying to set the picture property of a command button from an Addin which places controls on a form in a vb project.
This is an example of the way I set the rest of the properties when adding the button.
With frmNewForm.VBControls.Add("CommandButton"
.Properties
.item("Top"
= 100
.item("Left"
= 100
.item("Name"
= "cmdWhatever"
.item("Width"
= 295
.item("Height"
= 295
.item("Style"
= 1
.item("TabStop"
= False
'this doesn't work
.item("Picture"
= "D:\dev\Seltrol\Graphics\Locator.bmp"
'neither does this
.item("Picture"
= LoadResPicture(5001,vbResBitmap)
End With
This is an example of the way I set the rest of the properties when adding the button.
With frmNewForm.VBControls.Add("CommandButton"
.item("Top"
.item("Left"
.item("Name"
.item("Width"
.item("Height"
.item("Style"
.item("TabStop"
'this doesn't work
.item("Picture"
'neither does this
.item("Picture"
End With