Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
moody SendMessage
Old
  (#1)
Raoul Watson
Guest
 
Posts: n/a
Default moody SendMessage - 06-04-2007, 10:32 AM

I have a very strange problem with "SendMessage". I have a code which places
a graphic picture inside a richtextbox, the code is simple, like this:

Editor.glo.Picture = LoadPicture("somepic.bmp")
Clipboard.Clear
Clipboard.SetData Editor.glo.Picture
gResult = SendMessage(Editor.RichTextBox1.hwnd, WM_PASTE, 1, 0)


The declares/defs looks like:

Public Const WM_PASTE = &H302

Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal msg As Long, ByVal wp As Long, lp As Any) As Long

==============================================

My issue is that sometimes it works and sometimes it doesn't. I have tried
screen resolution changes, memory changes (thinking adding or removing code
caused it), etc. to no avail.

Can anyone see anything wrong with the code above (or perhaps have a better
recommendation than my approach of placing a graphic object)?

Any info or suggestion is appreciated. Thanks and God Bless.
_Raoul


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top