Option Explicit
Private Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long Private Const WM_PASTE = &H302 Private Sub Command1_Click() ' Copy the picture into the clipboard. Clipboard.Clear Clipboard.SetData Picture1.Picture ' Paste the picture into the RichTextBox. SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0 End Sub Private Sub Form_Load() End Sub Private Sub Timer1_Timer() If Label1.Top = 165 Then Timer1.Enabled = False End If Label1.Top = Label1.Top - 15 End Sub |