Code:
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
'copy the image to clip board
Clipboard.Clear
Clipboard.SetData Picture1.picture,0
'Insert the image in richtextbox
SendMessage Form1.rtftext.hWnd, WM_PASTE, 0, 0
but these image don't let you write the text like a background image only arround it.
but for put 1 image background theres 1 tip
make it transparent:
Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
'important use these code before show the richtextbox(for you don't see 1 bug;))
RichTextBox1.Text = ""
SetWindowLong RichTextBox1.hWnd, -20, 32
now... put the richtextbox in picturebox container(not on it(Zorder)). then you can put 1 image in picturebox and play with it by using the api functions
and heres a bonus: http://www.planet-source-code.com/vb...xtbox&lngWId=1
(moderators? if i can't use these link, please PM me... thanks)