VS 2010 how insert animated images on Richtextbox?-VBForums
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,098

    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
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    95,183

    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.

    2007-2016

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

  3. #3

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

    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
    Fanatic Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    784

    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. See my First CodeBank Submission Upgrading to the newest IE when using the Webbrowser control See my Second CodeBank SubmissionVB.NET - Recording History or changes using WebbrowserControl RichTextBox Textbox
    See my Third codebank submission VB.NET - Detecting Secure/Insecure Websites (ssl) w/ Webbrowser control See CodeBank Submission 4 A Simple Large View Calendar Control See my browser project BeffsBrowser Try my SpeedTest Project

    Unless said otherwise (e.g. From one of my projects thus, those are mostly licensed under MIT) - 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,098

    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
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    95,183

    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.

    2007-2016

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

  7. #7

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

    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,098

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.