Hey,
I'm quite new to C# so excuse me if this is a stupid question. I would like to scroll some text from the bottom of the screen to the top of the screen line-by-line. What is the easiest way to achieve this?
Cheers,
Pete
Hey,
I'm quite new to C# so excuse me if this is a stupid question. I would like to scroll some text from the bottom of the screen to the top of the screen line-by-line. What is the easiest way to achieve this?
Cheers,
Pete
On the screen on the form ?
Because if on the screen then you will need to import the DllImport("User32.dll")] and use method.
public static extern IntPtr GetDC(IntPtr hwnd);
public static extern void ReleaseDC(IntPtr dc);
If on the form easy way is to create a method that will change the string positon and put in in a look that sleep for a 100ms.
Since you're planning on writing directly to the Desktop, I would strongly suggest not doing this.
A much simpler way is to draw the text onto a transparent form (use the form's TransparencyKey
property to achieve this), and then move the Location of the form to achieve the scrolling effect.