home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,298 of 10,840   
   Raoul Watson to All   
   moody SendMessage   
   02 Dec 06 13:46:20   
   
   From: WatsonR@IntelligenCIA.com   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca