Learning C#

So over the spring break, I wrote a quick ~450 line C# program in order to learn the language. Within a day or two I had uScribble, an automatic screen-raster-renderer. To put it simply, it hijacks your mouse and draws things for you. Jumping from Java to C# was actually easier than I had thought. uScribble was basically a from-scratch copy of a similar Java application I had made in the past. There were various improvements, however. Before I get any farther, here is a picture of what it looks like, and what it can do:

Lorenz Attractors and Awesome-Smiley



First, I had the program draw a Lorenz attractor, and then reproduce a small graphic of a the “Awesome-Smiley”.  Some of the technical hurdles that I faced included figuring out how to hook the mouse cursor at a low level, both to send it movement and click instructions in addition to figuring out what its position and button states were, multithreading the application, and manipulating raster images in various ways (scaling, thresholding, etc). I had programmed similar functionality into the older Java version of this program, but lots of little things were different.

Building a decent graphical user interface (GUI) for the program was easier in C# than in Java, if only because C# lives and breathes inside Visual Studio (which makes GUIs a breeze), while I had programmatically created the Java GUI using Swing. It was easy to multithread the program in either language. I only had to create a function (or in Java, a class) which I then basically started as a new thread. Here is what the final GUI looks like:



I have yet to touch some of the more interesting features of the C# language. You can use lambda functions with it, which I imagine will make a few types of programs much easier to code. Memory access is another topic I should also explore in the future. Perhaps I will make a memory scanner that finds certain specific values in memory… (Cheat Engine, anyone?) Or perhaps I could program something for the XBox 360. Anyone want to buy me one?

In case you haven’t figured out the most natural use for such a program, let me say that it is really useful in trolling those online, multi-user drawing boards, like iScribble. So in the interest of making the world a more chaotic place, you can download my program here

This entry was posted in Art, C#, Programming. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Michael
    Posted May 16, 2011 at 12:12 AM | Permalink

    This is jeaniousse. Tell me, squire, what do you believe are the moral implications of releasing such a… deadly tool, to the masses? Hmm?

    • Tasyne
      Posted May 16, 2011 at 6:55 PM | Permalink

      Well, since I don’t know exactly who I am releasing it to, I refuse to be considered an enabler. So I’m getting off scotch-free on the moral side of things ;)

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>