Results 1 to 8 of 8

Thread: how insert animated images on Richtextbox?

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    how insert animated images on Richtextbox?

    how insert animated images on Richtextbox?
    (i found, on Code Bank, a code but it's for VB6)
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: how insert animated images on Richtextbox?

    Inserting an image into a .NET RichTextBox is generally done via the Clipboard, if I remember correctly. There are plenty of examples about. I doubt you'll get animation though, as I doubt a RichTextBox is built to support that.

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Re: how insert animated images on Richtextbox?

    the Clipboard and Paste don't work with animation(i belive the Clipboard works, but not Paste).
    i had found these Code Bank: http://www.vbforums.com/showthread.p...ricks-and-Tips
    but i don't know convert these VB6 code to VB 2010.
    can you help me convert the code?
    i belive the moeur, is working with RTF way... but i'm confused on that code.
    i have the code working fine on VB6, like i need
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: how insert animated images on Richtextbox?

    There is no "VB 2010" After VB6 it was VB.NET, sure there are some changes over the years I have read on, but in general it isn't of a certain year, as VS is released every 2 years.

    .NET platform isn't easy for any kind of animation tbh.


    Found this (its VB6 so if there is something that is changed I will add it later on in this post)
    http://www.vbforums.com/showthread.p...n-Rich-TextBox
    What did you expect? RTB is not a player - it's a text editor that allows to display static images (and thanks for that...).
    That also suggests using a image viewer, or maybe even a picture box.

    Do you absolutely have to use a RTB? If no, I suggest using something else xD.
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

  5. #5

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Re: how insert animated images on Richtextbox?

    we can add control on Richtextbox, but they aren't embeded on text. unless we use OLE functions(i'm 100% new with them and confused).
    i'm trying use the RTF, but i don't know how to work with. i'm getting trouble:
    - converting image to data;
    - the RTF header for add images.
    i accept sugestions.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: how insert animated images on Richtextbox?

    Quote Originally Posted by jdc20181 View Post
    There is no "VB 2010" After VB6 it was VB.NET
    It depends how you look at it. The original version of VB.NET was also named VB7. The next version was VB7.1 and was also known as VB.NET 2003, at which point the original version was also referred to as VB.NET 2002. Subsequent versions were named VB 2005 (VB8), VB 2008 (VB9), VB 2010 (VB10), VB 2012 (VB11), VB 2013 (VB12), VB 2015 (VB13) and now VB 2017 (VB14). Each one is still considered the same language but each version has added new features and keywords so it can be relevant to know which version of the language you're working against and also which version of .NET you're targeting.

  7. #7

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Re: how insert animated images on Richtextbox?

    Quote Originally Posted by jmcilhinney View Post
    It depends how you look at it. The original version of VB.NET was also named VB7. The next version was VB7.1 and was also known as VB.NET 2003, at which point the original version was also referred to as VB.NET 2002. Subsequent versions were named VB 2005 (VB8), VB 2008 (VB9), VB 2010 (VB10), VB 2012 (VB11), VB 2013 (VB12), VB 2015 (VB13) and now VB 2017 (VB14). Each one is still considered the same language but each version has added new features and keywords so it can be relevant to know which version of the language you're working against and also which version of .NET you're targeting.
    thanks for that information. now i understand that, on some projects, i must say the framework version. thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  8. #8

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Re: how insert animated images on Richtextbox?

    Quote Originally Posted by jdc20181 View Post
    There is no "VB 2010" After VB6 it was VB.NET, sure there are some changes over the years I have read on, but in general it isn't of a certain year, as VS is released every 2 years.

    .NET platform isn't easy for any kind of animation tbh.

    Found this (its VB6 so if there is something that is changed I will add it later on in this post)
    http://www.vbforums.com/showthread.p...n-Rich-TextBox


    That also suggests using a image viewer, or maybe even a picture box.

    Do you absolutely have to use a RTB? If no, I suggest using something else xD.
    i'm update the original RichTextBox.
    - every code that uses Paste() method, only the 1st frame is pasted;
    - using the the Controls collection, we can add controls(even a picturebox with animated image), but we can write on back. we can protect the text on that control dimensions, but for move like an emotion, is more dificulty to control;
    - we have the IRichEditOle it's very complex and dependent on several objects. so it's difulty to start;
    - i belive that we can use API for add embebded controls. what you can tell me?
    - we can use RTF, but i'm failling on code. what is the comple header for add an image(i have seen the VB6(its on Code Bank of these forum) gif animated)?
    VB6 2D Sprite control

    To live is difficult, but we do it.

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