Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/11/2005, 18:31
Avatar de jc_moty
jc_moty
 
Fecha de Ingreso: septiembre-2005
Ubicación: Usulután, El Salvador
Mensajes: 477
Antigüedad: 18 años, 7 meses
Puntos: 1
Esto iria en el boton Insertar Imagen
Código:
Dim imgLaImagen As Picture
Dim strContenidoPortapapeles As String
Set imgLaImagen = LoadPicture("C:\imagen.jpg")
strContenidoPortapapeles = Clipboard.GetText
Clipboard.Clear
Clipboard.SetData imgLaImagen
SendMessage RichTextBox1.hWnd, WM_PASTE, 0, 0
Clipboard.Clear
Clipboard.SetText strContenidoPortapapeles
Y debes declarar la siguiente API en la parte General - Declaraciones, osea por encima de todos los eventos, procedimientos y funciones o bien en un modulo; solo que en el modulo, tendrias que cambiar Private por Public.
Código:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Const WM_PASTE = &H302
Saludos.