|
ED
|
avaliable
|
RT
|
read only
|
Returns the position of the left window border of the dynamic element in pixel. The value defines the distance from the left border of the screen.
'*** Move picture Public Sub LeftClickUp_Element_Move_Horizontal(obElem As Element) Dim obElement As Element Dim obPicture As DynPicture Dim nWidth As Long '*** Get picture-Object Set obPicture = obElem.Parent.Parent If (obPicture Is Nothing) Then MsgBox "Error: Picture-object is invalid..." Exit Sub End If '*** Get element BITMAP_BTN_1 Set obElement = obPicture.Elements.Item("BITMAP_BTN_1") If (obElement Is Nothing) Then MsgBox "Error: element BITMAP_BTN_1 doesn't exists..." Exit Sub End If '*** moves element to top of the picture nWidth = (obElement.Bottom - obElement.Top) '*** moves element If (obElement.Right <= obPicture.Width) Then obElement.Move obElement.Right, obElement.Top, (obElement.Right + nWidth), obElement.Bottom Else obElement.Move obPicture.Left, obElement.Top, obPicture.Left + nWidth, obElement.Bottom End If End Sub