Recently in SharpTerminal Category

Another update to SharpTerminal: this one fixes the large blank spaces on the bottom and right sides of the GUI, as well as a minor startup bug where if you hadn't saved any default settings, and hit Connect without going to the Config tab, you'd get an error. Going to the Config tab and back fixed the problem, but now it shouldn't appear at all.

The GUI bug was an interesting one for me. The computer I write SharpTerminal on had the DPI setting (Display Properties, Settings, Advanced) set to Large (90DPI). So the GUI looked fine on that computer, but it turns out that .Net is smart enough to perform Automatic Control Scaling according to the difference between the developer's settings and the runtime settings. This works great when the developer's settings are Normal and the runtime settings are whatever; Windows Forms scales the GUI appropriately. Things get a little weird when the developer's settings are Large (or possible any non-Normal setting)--as you can see in the screenshot below, on a system set to Normal, the scaling doesn't quite work:

User interface with large blank gaps on the right and bottom edges.

The solution turns out to be fairly convoluted. First, set the developer's computer to use Normal DPI settings and restart the PC. Next, open the solution in VS.Net and go to the code for the form with the issue. Look for a line that says this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); in the Windows Form Designer generated code region, and change the values to 5, 13 (the default values for a Normal system). Open the form in designer mode. Things will likely be very screwed up (controls will run off the bottom and right sides). Fix them. Note that some controls--for instance, the Microsoft ActiveX Web Browser Control--will probably have to be removed and readded in order to work properly. Recompile and the app should look right.

Of course, probably the best idea is for developers to not use strange DPI sizes to develop UIs in the first place. :-P

SharpTerminal Update - COM port fix

|

New version of SharpTerminal available. Here's the changelog:

  • Fixed issues with COM ports not being consistently named between systems. Seems like the name of the COM port varies from system to system -> Mobo related?
  • Added ability to disable local echoing.
  • Added ability to automatically append a string (incl. hex chars) to every message.

SharpTerminal 1.0

| | Comments (4)

So yeah, this is my new blog showcasing technology and programming, so that Jenny doesn't have to read all that boring stuff unless she wants to. ;)

For my first post, I'm going to present a little app I've put together called SharpTerminal. As the name suggests, it's a terminal app (essentially a replacement for Hyperterminal) written in C#. It does a number of things Hyperterminal doesn't do, including a command buffer, easy entry of binary (non-printable) data, display of carriage return/line feed, etc. Oh heck, here's the ReadMe:

Features:

  1. View communication as either ASCII text or hexadecimal values
  2. Save full session transcripts in multiple formats for easy analysis
  3. Open previous session transcripts
  4. Easy entry of binary data (prepend with 0x for hex entry)
  5. Unlimited command history (up and down arrow in Send box)
  6. Show or hide connection, control line, etc events.
  7. Colored text for ease of distinguishing between sent and received data
  8. Multithreaded for responsiveness
  9. Prettier than Hyperterminal

Future Enhancements:

  1. Error Handling is not completely up to snuff. It won't crash, but it's not as pretty as it could be.
  2. Allow user to select encoding for "Text" mode.
  3. Enable DTR handshaking
  4. Consider allowing the intermixing of ASCII and binary?
  5. Add automatic crash reporting.

System Requirements:

  1. Microsoft .Net Framework, version 1.1. It might run against 1.0, I haven't tried.
  2. Internet Explorer (any version 4 or later should work AFAIK).
  3. One or more serial ports.

Licensing:
SharpTerminal use is not limited; you may copy it, redistribute it freely, use it in a business, install it on a rocket and shoot it to the moon, or anything else I haven't mentioned here, with the following restrictions:

  1. No claiming it is your own work. You must include this ReadMe.txt file, UNMODIFIED, any time you redistribute it.
  2. Actually, that's pretty much it. If you really need specifics, see http://creativecommons.org/licenses/by/1.0/

Questions? Comments? Bugs? Feature Requests?
Visit http://www.randomtree.org/sharpterminal/ or e-mail code@randomtree.org

All code, text, and images copyright 2004 Eric Means.

If it sounds like something you could use, download SharpTerminal and give it a try (the zip file is about 1.5MB)!

About this Archive

This page is a archive of recent entries in the SharpTerminal category.

Rants is the previous category.

Tools is the next category.

Find recent content on the main index or look in the archives to find all content.

SharpTerminal: Monthly Archives

Powered by Movable Type 4.01