Defines the first graphic.
Get
| C# | SftPictureObject refImageObj = object.Image1; |
| VB.NET | refImageObj = object.Image1 As SftPictureObject |
| C++ | ISftPictureObject* refImageObj = object->Image1; ISftPictureObject* refImageObj = object->GetImage1(); |
| C | HRESULT object->get_Image1(ISftPictureObject** refImageObj); |
| VB | Set refImageObj = object.Image1 As SftPictureObject |
Put
| C# | SftPictureObject object.Image1 = refImageObj; |
| VB.NET | object.Image1 = refImageObj As SftPictureObject |
| C++ | ISftPictureObject* object->Image1 = refImageObj; void object->PutImage1(ISftPictureObject* refImageObj); |
| C | HRESULT object->put_Image1(ISftPictureObject* refImageObj); |
| VB | object.Image1 = refImageObj As SftPictureObject |
object
refImageObj
Defines the first graphic.
The Image1 property defines the first graphic.
The Image1Hover property is used if the mouse cursor is located on the control or picture component, Image1Pressed is used if the button is pressed or Image1Disabled is used if the control is disabled (see Enabled property). Otherwise, the Image1 property is used to display the first graphic. Image1Hover, Image1Pressed and Image1Disabled are ignored if no graphic has been defined using the Image1 property.
The layout of the button label and the position and alignment of the first picture component are defined using the Orientation, Image1AlignHorz and Image1AlignVert properties.
For detailed information on the use of the Orientation, Image1, Image1AlignHorz, Image1AlignVert, Image2, Image2AlignHorz, Image2AlignVert, Text, TextAlignHorz, TextAlignVert properties, please see "Button Label".
Application.Exit();
}
private void ChangePicture_Button3()
{
// Change the pictures based on the button's Pressed status
if (axSftButton3.Pressed)
{
axSftButton3.Image1.NETImageObject = imageList1.Images[1];
axSftButton3.Image2.NETImageObject = imageList1.Images[0];
} else {
axSftButton3.Image1.NETImageObject = imageList1.Images[0];
axSftButton3.Image2.NETImageObject = imageList1.Images[1];
}
}
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Application.Exit() End Sub Private Sub ChangePicture_Button3() ' Change the pictures based on the button's Pressed status If AxSftButton3.Pressed Then AxSftButton3.Image1.NETImageObject = ImageList1.Images(1) AxSftButton3.Image2.NETImageObject = ImageList1.Images(0) Else AxSftButton3.Image1.NETImageObject = ImageList1.Images(0) AxSftButton3.Image2.NETImageObject = ImageList1.Images(1) End If End Sub Private Sub axSftButton3_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxSftButton3.ClickEvent
IPicture* pPic;
HRESULT hr = ::OleCreatePictureIndirect(&pictDesc, IID_IPicture, TRUE, (void**)&pPic);
ASSERT(SUCCEEDED(hr));
if (FAILED(hr)) return;
IPictureDispPtr pPicDisp = pPic;
ISftPictureObjectPtr pImg1;
hr = m_vButton3->get_Image1(&pImg1);
ASSERT(SUCCEEDED(hr));
hr = pImg1->put_Picture(pPicDisp);
ASSERT(SUCCEEDED(hr));
bmp.DeleteObject();
pPic = NULL;
Private Sub CloseButton_Click()
End
End Sub
Private Sub Form_Load()
With SftButton2
' you could set these at design time using the property pages
Set .Image1Pressed.Picture = PictureOn.Picture
Set .Image1.Picture = PictureOff.Picture
End With
End Sub
Private Sub ChangePicture_SftButton3()
' Change the pictures based on the button's Pressed status
With SftButton3
If .Pressed ThenSee Also SftButton Object | Object Hierarchy