DynPicture.Width



Width() As Long
ED
avaliable
RT
read only

Remarks

Returns the defined width of the picture in pixels. The width of the picture is the difference between the right and the left border.

Hint: This property cannot be set, if the property "UseTemplateSize" is set TRUE.

Sample:

The following VBA example moves the current picture to the bottom and to the right by 10 pixels.


'*** The current picture is moved by 10 pixel/side (top,bottom,left,right)
Public Sub LeftClickUp_Picture_Move(obElem As Element)
	Dim obPicture As DynPicture

	'*** Get picture-object
	Set obPicture = obElem.Parent.Parent
	If (obPicture Is Nothing) Then
		MsgBox "Error: Picture-object is invalid..."
		Exit Sub
	End If

	'*** De/-activate the current picture
	obPicture.Move obPicture.Left + 10, obPicture.Top + 10, obPicture.Width, obPicture.Height
	obElem.LeftClickUp
End Sub


See Also

DynPicture