Results 1 to 6 of 6

Thread: Rich textbox....

  1. #1

    Thread Starter
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011

    Rich textbox....

    OK here's the code...

    VB Code:
    1. Dim x As New OLEObject
    2. r1.OLEObjects.Add , , "d:\heq.bmp"
    3. 'r1.AutoVerbMenu = False
    4. r1.SelStart = Len(r1.SelText)
    5. Set x = r1.OLEObjects.Add(, , "d:\java.gif")

    This is successfully embedding bmp and gif into RichTextbox but when adding GIF.. it is also opening the program gif file is associated with..
    Is there any way to stop this program from opening?

  2. #2

    Thread Starter
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Anybody???plzzzzzz

  3. #3

    Thread Starter
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Hey ppl come up..!!!!
    This place was never so dump!!!!!

  4. #4
    Junior Member
    Join Date
    Jun 2003
    Location
    starvald demelain
    Posts
    20
    i know a way to close it when its open. is that oke??
    tosso is learning vb

  5. #5

    Thread Starter
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Hmm.. API??? that captures the started window HWND and then use send this Wnidow WM_EXIT???? I know this one.. is there any other way?

  6. #6
    Addicted Member
    Join Date
    Jul 2002
    Posts
    234
    well, this doesn't really answer your question but may offer an explanation. The RichEdit component doesn't natively support any image format but .bmp. Whenever you add an image of a different format to a RichEdit window (like wordpad), the data is actually converted to a bmp. My guess is that when you add the gif, RichEdit is making the conversion as well as passing the .gif handling off to the program handling gif images. The best way to avoid the problem is to simply use bitmaps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width