Самоучитель VBA


         

ByVal Shift As Integer, ByVal


End With

End If

End Sub

'

Private Sub Labell_MouseMove(ByVal Button As Integer,

ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

If Button = 1 Then

Set КoлoбoкDataObject = New DataObject

Dim ТипПеремещения As Integer

Kono6oKDataObject.SetText Labell.Caption

ТипПеремещения = КoлoбoкDataObject.StartDrag

End If

End Sub

Private Sub Label2_BeforeDragOver(ByVal Cancel As MSForms.ReturnBoolean,

ByVal Data As MSForms.DataObject,

ByVal X As Single, ByVal Y As Single,

ByVal DragState As Long,

ByVal Effect As MSForms.ReturnEffeet,

ByVal Shift As Integer)

Cancel = True

Effect = fmDropEffectCopy

End Sub

Private Sub Label2_BeforeDropOrPaste(ByVal Cancel

As MSForms.ReturnBoolean,

ByVal Action As Long,

ByVal Data As MSForms.DataObject,

ByVal X As Single,

ByVal Y As Single,

ByVal Effect As MSForms.ReturnEffeet,

ByVal Shift As Integer)

Cancel = True

Effect = fmDropEffectCopy

Label2. Caption = KолoбoкDataObject .GetText

End Sub

Private Sub UserForm_Initialize()

'

Labell.BorderStyle = fmBorderStyleSingle

Label2.BorderStyle = fmBorderStyleSingle

With Imagel

.PictureAlignment = fmPictureAlignmentTopLeft

.PictureSizeMode = fmPictureSizeModeZoom

.BorderStyle = fmBorderStyleNone End With

'ВеселыйКолобок

End Sub

Sub ВесельйКолобок()

Imagel.Picture = LoadPicture("Dot_a.bmp")

End Sub

'

Sub ПечальныйКолобок()

Image1.. Picture = LoadPicture ("Dotl_a.bmp"

) End Sub




Содержание  Назад  Вперед