Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to implement a teleprompter?

How to implement a teleprompter?

Scheduled Pinned Locked Moved C#
graphicsgame-devcsharpwinformstutorial
11 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B beatles1692

    Hi I'm working on a teleprompter software (that flips a given text and lets the user to scroll it pixel by pixel) I tried GDI+ using C# .Each time the user wants to scroll the text an image of the current lines is made.Then the image is rotated and loaded into a pciture box. Unfortunately this procedure is very slow. I like to ask if there is anyway that I can do the same thing using DirectX or OpenGL (I've already searched the ineternet but I couldn't find any answer) Is there any other way that I can show the text upside down and let the user to scorll it? Thanks a lot

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #2

    Use a RotateTransform before drawing the text onto your Graphics object. You will need to do a TranslateTransform as well to get things where you expect them to be.

    Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

    B 1 Reply Last reply
    0
    • C Christian Graus

      Use a RotateTransform before drawing the text onto your Graphics object. You will need to do a TranslateTransform as well to get things where you expect them to be.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      B Offline
      B Offline
      beatles1692
      wrote on last edited by
      #3

      Hi Thank you. Actually I have tried it but the text blinks(The picture is painted every 10 milliseconds) Here's what I did: 1.Get the graphics object. 2.Clear 3.RotateTransform 4.TranslateTransform 5.DrawText 6.Flush 7.Dispose It seems that every time the clear method is called casues the text to blink Is there anyway that I can make the movement of the text smoother ? Thanks again.

      O 1 Reply Last reply
      0
      • B beatles1692

        Hi Thank you. Actually I have tried it but the text blinks(The picture is painted every 10 milliseconds) Here's what I did: 1.Get the graphics object. 2.Clear 3.RotateTransform 4.TranslateTransform 5.DrawText 6.Flush 7.Dispose It seems that every time the clear method is called casues the text to blink Is there anyway that I can make the movement of the text smoother ? Thanks again.

        O Offline
        O Offline
        Obaid ur Rehman
        wrote on last edited by
        #4

        You might need to apply double buffering to the form. That way it won't flicker.

        B 1 Reply Last reply
        0
        • O Obaid ur Rehman

          You might need to apply double buffering to the form. That way it won't flicker.

          B Offline
          B Offline
          beatles1692
          wrote on last edited by
          #5

          Hi How can I apply double buffering to the form ? Thnaks

          O M 2 Replies Last reply
          0
          • B beatles1692

            Hi How can I apply double buffering to the form ? Thnaks

            O Offline
            O Offline
            originSH
            wrote on last edited by
            #6

            If your using .Net 2.0 theres a property on the form called 'DoubleBuffered', just set it to true.

            1 Reply Last reply
            0
            • B beatles1692

              Hi How can I apply double buffering to the form ? Thnaks

              M Offline
              M Offline
              Martin 0
              wrote on last edited by
              #7

              Hello, If you are using .Net 1.x, you have to use the SetStyle method of the Form class.

              this.SetStyle(
              ControlStyles.DoubleBuffer |
              ControlStyles.AllPaintingInWmPaint |
              ControlStyles.UserPaint |
              ControlStyles.ResizeRedraw,
              true);

              In .Net 2.0 there is a new member of the ControlStyles enum which optimizes the perfomance of DoubleBuffering.

              this.SetStyle(
              ControlStyles.OptimizedDoubleBuffer |
              ControlStyles.AllPaintingInWmPaint |
              ControlStyles.UserPaint |
              ControlStyles.ResizeRedraw,
              true);

              All the best, Martin

              B 1 Reply Last reply
              0
              • M Martin 0

                Hello, If you are using .Net 1.x, you have to use the SetStyle method of the Form class.

                this.SetStyle(
                ControlStyles.DoubleBuffer |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.UserPaint |
                ControlStyles.ResizeRedraw,
                true);

                In .Net 2.0 there is a new member of the ControlStyles enum which optimizes the perfomance of DoubleBuffering.

                this.SetStyle(
                ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.UserPaint |
                ControlStyles.ResizeRedraw,
                true);

                All the best, Martin

                B Offline
                B Offline
                beatles1692
                wrote on last edited by
                #8

                Hi Thank you very much indeed. Best regards

                M 1 Reply Last reply
                0
                • B beatles1692

                  Hi Thank you very much indeed. Best regards

                  M Offline
                  M Offline
                  Martin 0
                  wrote on last edited by
                  #9

                  You are welcome! All the best, Martin

                  M 1 Reply Last reply
                  0
                  • M Martin 0

                    You are welcome! All the best, Martin

                    M Offline
                    M Offline
                    muralidhar_17
                    wrote on last edited by
                    #10

                    Can anyone pls give me a smaple application of this code usage in double buffering and preview of teleprompter window of same form on two monitors. this.SetStyle( ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.ResizeRedraw, true); Thank you.

                    1 Reply Last reply
                    0
                    • B beatles1692

                      Hi I'm working on a teleprompter software (that flips a given text and lets the user to scroll it pixel by pixel) I tried GDI+ using C# .Each time the user wants to scroll the text an image of the current lines is made.Then the image is rotated and loaded into a pciture box. Unfortunately this procedure is very slow. I like to ask if there is anyway that I can do the same thing using DirectX or OpenGL (I've already searched the ineternet but I couldn't find any answer) Is there any other way that I can show the text upside down and let the user to scorll it? Thanks a lot

                      M Offline
                      M Offline
                      Member 1490259
                      wrote on last edited by
                      #11

                      hello, I also want achieve the same task, but unfortunately i am not able to succeed, I used grid for developing prompter but my issue is grid scrolling is row by row not pixel by pixel. Kindly give me some idea to develop prompter app. Thanks

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups