Slashdot Mirror


Simple Windows Development Tools?

fwc asks: "Over the past few years, I've been fortunate to be able to avoid writing a Windows GUI application, however this good luck is coming to an end. In the next few weeks, I need to write a fairly simple application which will need to display data received from a serial port in a decoded (and graphical) form via a Windows GUI. Unfortunately, my skills in this area are out of date, since I haven't written any GUI apps for close to 10 years. Because this program needs to be fairly small and easy to install, the use of Perl/tk isn't a valid option. What options do I have to build a small application on Windows, without a large learning curve?"

44 of 255 comments (clear)

  1. Some options: by hummassa · · Score: 4, Informative

    1. Graphical IDE: (in order of my recommendation) Delphi (C++Builder if you are too much into C++), KDevelop, Eclipse or VB.

    or...

    2. You can hire someone (like me!! hmassa at gmail) to do it for you. :-)

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  2. Visual Basic by Sarlok · · Score: 5, Informative

    It's easy to learn and the GUI designer is also easy to use. What's more, with the new (2005) version, there is a free "Express" edition that you can download from Microsoft.

  3. Visual Basic Express Edition by PoiBoy · · Score: 4, Informative
    I'd recommend trying Microsoft Visual Basic 2005 Express edition, in part because it is free but more importantly because it comes with a very easy-to-use GUI designer and a wealth of online help. My understanding is that it's basically a stripped-down version of Visual Studio.

    I just started using Windows XP (out of curiosity) after having used Linux for the last six years, and I honestly have to say I've been very impressed with the development tools Microsoft makes available for free.

    --
    Sig (appended to the end of comments you post, 120 chars)
  4. Re:VB by Fallus+Shempus · · Score: 5, Informative

    I'd agree from a complete programming novice
    but you've got a nice free choice (as long as it's not commercial code)
    if you have more experiance (especially C++)
    http://msdn.microsoft.com/vstudio/express/

  5. TCL/TK by jmac880n · · Score: 4, Informative

    TCL/TK is small, easy-to-use, and portable over many systems.

    In addition, your entire program tree plus interpreter can be encapsulated using a starpack.

    1. Re:TCL/TK by Twylite · · Score: 4, Informative

      Kudos to the well-informed parent. Tcl/Tk is indeed an excellent solution. More below.

      But first ... Visual Basic is NOT the answer. The criteria were "fairly small" and "easy to install". For most Windows versions you'll have to distribute your VB application in an install package that includes the VB runtime DLLs or the .NET runtime (or get the end user to download them, which is a mission). If you're unlucky you'll have to distribute other MS DLLs like ComCtls as well. Find out more at http://msdn.microsoft.com/vbrun/ . Then there's accessing the serial port ...

      For a simpler solution, grab TclKit, a single-file Tcl/Tk distribution. Tcl is ridiculously easy to learn, serial port access is as easy as file access, and it uses Tk to provide a powerful GUI.

      You can put your scripts into the TclKit EXE as a resource, creating a single-file EXE distribution of your application. With UPX compression the resulting file will be around 1.2Mb (depending on what extensions you choose to use).

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    2. Re:TCL/TK by Anonymous Coward · · Score: 3, Informative

      Visual Basic is NOT the answer. The criteria were "fairly small" and "easy to install". For most Windows versions you'll have to distribute your VB application in an install package that includes the VB runtime DLLs or the .NET runtime (or get the end user to download them, which is a mission).

      Uh, what year is this? Since Windows 2000, maybe even further back, the VB6 runtime has been bundled with the OS. Even if you do distribute it yourself it's smaller than that TCL/TK distro you point at. And VB6 comes bundled with InstallShield lite to cover 'easy to install'. And upgrading comctl32 was like back in the IE3 days, Jesus.

      Now I hate VB6 with a passion but if you're going to bash it get it right.

    3. Re:TCL/TK by Soruk · · Score: 2, Informative

      You can put your scripts into the TclKit EXE as a resource, creating a single-file EXE distribution of your application. With UPX compression the resulting file will be around 1.2Mb (depending on what extensions you choose to use).

      I've used Freewrap for things like this, and at least the version I'm using, the resultant binaries typically weigh in at about 650K.

      --
      -- Soruk
    4. Re:TCL/TK by Anonymous Coward · · Score: 1, Informative

      This is no longer the case!

      Current revisions of Tk, especially with the Tile window kit look exactly like
      a windows application!

      There is no reason why a simple Tk/Tcl application can not look 100% windows
      native!

    5. Re:TCL/TK by Anonymous Coward · · Score: 1, Informative

      the behavior you describe is a limitation of the programmer, not of Tcl/Tk.

      Tcl/tk makes it stunningly easy to create single-file-deployment cross-platform GUIs that can do what probably 95% of all GUIs need to do with more than enough speed and eye candy. The difference between it and VB is that VB lets you create something that looks great and works horribly, and Tk lets you make something that looks OK but works great.

      And while it's true that in the past the GUIs looked only about 90% native, the upcoming version (8.5) will include a new theme engine that goes the extra 10% (well, maybe 9% since "native" is a moving target, at least on windows).

    6. Re:TCL/TK by Anonymous Coward · · Score: 1, Informative

      That depends. If the single file is named "tk-whatever.exe", yeah, maybe. With starkits and starpacks, you have either two files (tclkit.exe and application.kit) or one file (application.exe). Period. Likewise with freewrap you end up with a single .exe.

      And with that starpack or starkit, FWIW, you have an embeded database at your disposal, too, in addition to tcl and tk. Yes, all runtime libraries, data files (including images), executable bits, and a database all rolled into a single file. Pretty darn nifty.

  6. Hmmm by Tethys_was_taken · · Score: 2, Informative

    Visual Basic is definitely what you want to go for if you want a very simple way to get a half-decent GUI running. The only problem with VB is that, if you're coming from a C/C++ history, you're going to find it very messy. And you're going to feel "dirty" unless you spend a lot of time understanding the intricacies and see exactly how good/bad your app is.

    If you want the power of RAD and the ease of C/C++ I'd suggest you look into MFC programming. Google for all you need to get started. You can continue to use C/C++ and familiar code to create nice, simple Windows GUIs.

    Also, yes. You have definitely been very fortunate.

  7. RAD tools by morgan_greywolf · · Score: 3, Informative

    RAD tools are a great and easy way to write GUI apps without getting knee deep in the API (in this case, Win32). Borland's Delphi, C++ Builder, and C# Builder are great tools, and all work similarly, but support different languages and tools... C++ Builder is my personal favorite, but I C# Builder is nice for developing .NET applications. Borland also has a similar tool for Java. And there's always Visual Basic.

  8. wxWidgets by TheGreatOrangePeel · · Score: 3, Informative

    I'm guessing that you're going to hear a lot of people saying VisualBasic. Personally, hate VB. You might take a look at wxWidgets. I've only toyed with it myself, like what I've seen. There is also wxDevCPP which gives you a VB style GUI.

    1. Re:wxWidgets by uradu · · Score: 2, Informative

      Of course, it's only a GUI framework, you still need a language and compiler to use it. As has been mentioned, it's particularly smooth with Python. You can also try py2exe, which combines all your Python scripts into one single Windows executable that looks and smells just like any other Windows app, and doesn't require any Python runtime support DLLs. Pretty much spot-on for the OP's requirements, except possibly for language choice.

    2. Re:wxWidgets by ClayDowling · · Score: 3, Informative

      I've gone down this route myself and been very happy. I use Delphi daily, I've written some large VB apps, but wxWidgets was by far the best tool for rapid development for me. Dev-cpp from http://www.bloodshed.net/ was for me the fastest way to get a working C++ compiler up and running, and they have wxWidgets available as an installable module. You can find the latest version on their Community DevPack server.

    3. Re:wxWidgets by afd8856 · · Score: 2, Informative

      I can attest to that. Several years ago I've gone from complete clueless about python to having created, in a month, an app created with PythonCard, distributed with py2exe and innotools installer, COM communication with Word and Excel, temp storage with cPickle. It seems a more "hands on" approach, but it's actually very flexible and easy.

      Right now I've started a new version of that app, this time using wxGlade and I'm loving it. Python + wxWidgets = love

      --
      I'll do the stupid thing first and then you shy people follow...
  9. Options by truthsearch · · Score: 2, Informative

    It depends partly on your finances...

    Non-free (beer and speech):
    - VB - if you have a copy already it's the easiest choice for quick development; very small learning curve; few libraries required
    - .NET (C# or whatever) - free if you don't want MS development tools; very expensive tools to build one small app; much bigger learning curve; 20 MB runtime required
    - RealBasic - I hear great things but know nothing about it

    Free:
    - Python - use built-in UI libraries or better wxWidgets library; my preference for client/server development; moderate learning curve; python and libraries must be installed
    - Java - UI has a moderate to high learning curve; runtime requires installation or you may have browser applet as an option; free tools

    I'm sure there are others. These are the ones I'm most familiar with.

  10. Try Realbasic by Quiet_Desperation · · Score: 5, Informative
    I do mountains of Windows GUI crap to control my hardware designs via serial port and Ethernet. Realbasic makes it all easy and it's not as annoying as Visual Basic. Nicely object oriented. Even file i/o is OO.

    http://realbasic.com/

  11. Delphi beats pants of VB by heffrey · · Score: 2, Informative

    'Nuff said. And you can get a free version for personal use just like VB.NET express.

    The product is better but the biggest plus factor is the community of developers.

  12. RealBasic! by numbski · · Score: 4, Informative

    http://www.realbasic.com/

    Extra credit is that it can compile binaries for Windows, MacOS X, and Linux. I believe there's a demo version to try before you buy.

    If you're looking for completely free, unfortunately you may well be sol. KDevelop may be your only option as posted above, but I wasn't aware that KDevelop can give you win32 apps....?

    --

    Karma: Chameleon (mostly due to the fact that you come and go).

    1. Re:RealBasic! by blueapples · · Score: 2, Informative
      I commented farther down but I'd like your response too. I recommended to the poster that he check out PureBasic (http://purebasic.com/) or BlitzMax (http://blitzbasic.com/Products/_index_.php).

      These are both much cheaper than RealBasic (PureBasic is only USD 69, BlitzMax with it's gui is $105) and they both provide Windows, Linux, and Max OS. In addition, they expose the entire application code to you--you see exactly how everything is created which as I understand it is quite unlike RealBasic.

      My biggest problem with RealBasic though is by far it's price tag. Pro edition is $399.95 for each operating system. That's just...well that doesn't make sense given two alternatives that do the same thing (though I will admit RealBasic has a very nice IDE for the most part, other than only showing you one function at a time--at least in default mode).

      PureBasic may not be able to compete with Real, but I believe that BlitzMax can really give Real a run for it's money. It's a good OO language with a low price point, pleasant syntax, and great interaction between other language sources (C, C++ and ObjectiveC source files can be imported directly into an application).

      --
      www.blueapples.org
  13. Java is an option by dslauson · · Score: 2, Informative

    If Java is an option, both Jbuilder and Netbeans have good drag-and-drop GUI tools available. Your app would also be easy to intall and cross-platform, and you don't have to give MS any money.

    If that's no good, then Visual Studio is probably your best bet.

  14. Visual C++ Express? by Jugalator · · Score: 2, Informative

    It would've helped knowing what language choices you have.

    It sounds like you don't want to have your application require large libraries?

    For a low level serial port reader app with a slick GUI designer on strictly Windows, Visual C++ Express seems to be one way to go. It's free as in beer and supports native Windows application as well as .NET application development (in that case via Managed C++, but then you need the ~20 MB or so .NET Framework runtime included with your apps, and I guess you don't want that).

    One thing I can unfortunately not check now is whether it comes with the C++ GUI designer (which you'd probably be most interested in), as the screenshot only happened to show the .NET designer, and native C++ use a different one. I'm not sure if that one is included in the Express edition or not.

    --
    Beware: In C++, your friends can see your privates!
  15. One thing to be aware of: by uradu · · Score: 2, Informative

    All the Express editions only target .NET. At this point I still wouldn't consider the .NET framework ubiquitous quite yet, so this approach may seriously affect his deployment. Other than that, it's certainly a viable option. Another good one would be SharpDevelop, which might in fact be preferable to the Express editions purely for licensing reasons. I'm not sure if you're supposed to use Express builds for commercial purposes.

  16. Try WinBatch by Butterspoon · · Score: 2, Informative
    WinBatch, is a straightforward shareware Windows scripting language that has a very simple learning curve (it's easier than VB to pick up IMHO), and is incredibly powerful.

    You can compile to .EXE, do all manner of network, database, and desktop automation. And yes, you can play with the serial ports and much more.

    Best of all, there is an extensive tech support database and a lively user community, with active and remarkably prompt involvement from the principal architects of the language.

    I speak only as a satisfied customer, but this is really the type of shareware that makes you want to register it. I've done some remarkable things with it.

    --
    pi = 2*|arg(God)|
  17. Teach Yourself by Anonymous Coward · · Score: 1, Informative

    "Teach Yourself VB in 24 Hours"
    "Teach Yourself Visual C++ in 24 Hours"

    I'd keep away from .net stuff if a small footprint is required. it makes small executables but you'll have to ship the framework cuz not everyone has it. furthermore, most people with serial ports on their computers will be using older versions of windows. I like C++/MFC myself but VB 6 will do the trick.

    Scott

  18. Java or .NET by miyako · · Score: 4, Informative
    Java with Swing is a pretty quick way to write a GUI. Swing is well documented on sun's website- both with APIs and tutorials available. It also has the benefit of being largely crossplatform (though given your specific task there will probably be some native code that would have to be rewritten).
    If you don't want to learn Java, or you would prefer something more native to windows, .NET is a huge step up from the old way of creating windows GUIs. I haven't used it extensively, but it seems to be largely well thought out and well documented (though I still vastly prefer Sun's javadoc to Microsofts .NET documentation). .NET has the benefit of being able to work with most languages you would want to program in.
    A few general suggestions if you're rusty with GUI programing that you might want to consider as well:
    • Don't use form builder code for actual code. While GUI builders can be a good way to get an idea of the way you want the GUI to look, in my opinion they end up producing really ugly code. It's generally faster and easier to just write it from scratch.
    • Sketch out the GUI. Even for a simple GUI it's difficult to design a GUI while looking at code unless you're really comfortable with both the API and with the type of GUI your designing.
    • Seperate Logic from Display. It's tempting to put little bits of logic in the GUI code, but if you're going to be supporting the code you're life will be much easier if they are seperate. Essentially you are writing two programs. The program that does the task (in this case, reading the data from the serial port and processing the data) and the program that displays the task. It's fairly reasonable to say that if your program is properly designed, you should be able to create a text based interface for the application in a few hours. (Yes, there are programs you can't reasonable run without a GUI, but the point is, seperate logic from display).
    • Seperate Logic from GUI code. It' bears repeating. I've seen a lot of programs where the author/previous maintainer put a small but crusial bit of logic in the GUI code. Later when re-working the GUI code stuff breaks and it's very difficult to find out where/why.
    • Use Threads. In a lot of cases you can make the application feel much more responsive by keeping the display code in a seperate thread from the processing code.
    • Consider your Users. When you design a GUI, remember that small things can make big differences. Consider a couple of things. First off, what is the technical level of your target audience. Second, what are you're users going to do most often. For users with little technical proficency remember that it's often preferable to use terminology that they are familiar with, even if it's not the most precise way of displaying the information. (For example, many users are confused by "export" options for programs, so you should put those options under "save as".) What your users are doing is going to effect where things go. You don't want the most common task to be 3 menus deep and at the bottom of the last tab in an obscure options window, you want it to be a big button in the main window. Likewise you don't want the most commonly clicked button to be the third down in a list of 6 or something.
    • Last, spend a bit of time reading up on the psychology of colors and shapes. Certain shapes and colors tend to draw the eye and this can be useful to give users subtle visual cues and will make your application much more intuitive.
    --
    Famous Last Words: "hmm...wikipedia says it's edible"
  19. Starpacks, Tcl/Tk by DavidNWelton · · Score: 4, Informative

    If it's a starpack, they won't know what it is. They download one executable file that is smaller than 2 megs, and run it.

    http://www.equi4.com/starkit.html

    I'll second the Tcl/Tk recommendation. It's super easy to get an application up and running in no time. What's even better is that you can do most of the development on Linux if it's not an app that requires a lot of windows specific services, and then switch to windows to put the final touches on. I've even had it happen that I didn't need to change any code at all (but it's usually recommended, just to give your app that extra polish).

  20. Open Source .NET Tools by WombatControl · · Score: 2, Informative

    I've been able to put together a few simple apps using the .NET Framework, which despite being a Microsoft product, is actually pretty decent.

    You can use the Visual Studio Express products, but if you'd rather deal with a free (as in speech) alternative, SharpDevelop is as good as anything I've tried. You can use it to develop in either Visual Basic.NET or C#.Net, and it has a full and quite useful Windows.Forms layout system. For writing a basic Windows.Forms GUI, it's much less resource-intensive than Visual Studio, offers nearly the same features, and is GPL licensed.

    For doing Windows development, the .NET framework and Windows.Forms is your best bet, and SharpDevelop gives you a nice open-source IDE with all the features you need.

  21. QT or Delphi by nbritton · · Score: 2, Informative

    What about a QT app, the toolkit is free if you GPL the code. All it means is that you have to make avilable the source code (if requested) to the people (and only those people) you distribute the program to. Or you can buy the QT toolkit and then not be forced to release the code as GPL. You can use just about any backend language with QT too.

    Otherwise I would give Borland's Delphi a go. Delphi is turbo pascal with object-oriented extension's. It makes fast and very lightweight apps, and it's easy to learn. It also has a Linux counterpart called Kylix.

  22. Re:TCL/TK - serial ports? sure by DavidNWelton · · Score: 3, Informative

    If you work around the less than ideal formatting, you can find information about dealing with serial ports here:

    http://www.tcl.tk/man/tcl8.4/TclCmd/open.htm

    It's part of the core system. I recently created a coin operated internet system driven entirely with Tcl/Tk. I thought I'd have to do the serial port portion in C for speed reasons, but Tcl proved plenty fast - even a scripting language operates much, much faster than someone can shove coins into a slot.

  23. Re:VB by Haeleth · · Score: 2, Informative

    I'd go for anything in the .Net family. VB, or C# especially. The GUI tools for both are pretty much the same. However, the development tools can cost quite a bit.

    Indeed. I don't know how anyone can justify downloading Visual Studio Express Edition for free when they could get a Java IDE for half the price. :P

    (Yeah, the Express Editions are cut down somewhat. But they don't have any particularly nasty license terms - you can use them for commercial purposes - and they should do everything needed in this particular case.)

  24. C# Demo Program by rjstanford · · Score: 2, Informative

    You can grab a free copy of the Visual C# IDE from Microsoft. Start with something simple, like this sample program that reads serial output and dumps it into a window. Then add the gui parts - and there's obscene amounts of sample code for writing Windows GUIs. The advantage to using C# is that there's a strong likelyhood that if you need something special, you can buy a widget that handles it for you for $200 (under most Open environments it would be free, but it wouldn't work - at least once you get into the more obscure ones).

    Problem solved with a small amount of money and a small amount of time - and you have a standards-based application that any other Windows programmer will understand and be able to maintain. Unless you really want to spend all of your time working on stuff like this because you're the only person in the company who knows how to use your TCL/whatever/hybrid built-into-an-exe mess of a program? Cool as it may be, if it can't be trivially handed off to someone, its your problem for as long as you stay at the company.

    --
    You're special forces then? That's great! I just love your olympics!
  25. Re:Delphi is decent by AndroidCat · · Score: 2, Informative

    There are also a lot of sites with information like about.com. Tutorials for the beginner, tips and hints for the more advanced.

    --
    One line blog. I hear that they're called Twitters now.
  26. QT by Bluesman · · Score: 2, Informative

    You've got a bunch of good recommendations, but nobody's mentioned QT so far.

    I'm a big fan of QT on windows, and if you don't mind a bit of setup, the free GPL'd version works well with MinGW. The documentation is excellent, which probably would be helpful for someone learning to program GUI stuff.

    And it can be compiled statically so that distribution is as easy as copying an .exe file.

    --
    If moderation could change anything, it would be illegal.
  27. Re:VB by #undefined · · Score: 4, Informative
    what do you mean "as long as it's not commercial code"?

    there's no licensing restriction on visual studio express.


    4. Can I use Express Editions for commercial use?
    Yes, there are no licensing restrictions for applications built using the Express Editions.


    taken from here.
  28. Delphi by silverdirk · · Score: 4, Informative

    I'll second Delphi. It uses an OO form of the Pascal language, which might be a problem for some, but I'd take pascal any day compared to basic. Also, Delphi is every bit as easy to use as VB.

    I used Delphi at a co-op job for six quarters, and it just plain made me feel powerful. I could throw together a nice GUI in minutes, and then "wire up" the events to real code after getting approval from the people who would be using the program. By the time I was done, i'd have a nice professional-looking app that was only about 700K, didn't need any funny DLL files, and was made out of nice strongly-typed OO code, and took advantage of the huge selection of freeware widgets on sites like http://www.torry.net/

    Delphi is the perfect language for writing fast windows apps. Its also perfect for database access, and with the right packages, can be perfect for lots of other tasks, like serial port access. (and what I mean by that is that you can go fumbling around with the Windows Serial port API, or you can get a nice I/O package for Delphi and just drag/drop some components that give you nice events to play with.)

    To top it off, if you look at the assembly generated by the compiler, its really pretty good. You might say it's equivalent to -O1 on C code, and thanks to its single-pass compiler, it compiles 10x as fast, so there's basically no wait.

    --
    Mark of the Coder fades from you. You perform Opening on World of Warcraft. Warcraft crits GPA for 4. GPA dies.
  29. Re:VB by el_gordo101 · · Score: 2, Informative

    The .NET Framework Version 1.1 Redistributable Package is available here. You can use the Visual Studio .NET Bootstrapper plugin to distribute it with your application.

    --
    TODO: Insert witty sig
  30. Stay clear of .NET if not already there by Curmudgeonlyoldbloke · · Score: 2, Informative

    Not because there's inherently anything wrong with it, but the framework download is 23Mb and therefore isn't exactly "fairly small".

    Of course, if you can guarantee that the framework will already be there everywhere you're going to install, then it's not an issue.

  31. Re:VB by Pentavirate · · Score: 2, Informative

    Something to watch out for with C# and .NET is that there isn't any native .NET access to the serial port. You'd end up having to wrap Win32 dlls. It isn't too hard, but it may be much for a novice and it all comes free in VB6. You'd have to weigh your options. If this is a one-time thing, VB6 would be great. If there will be a lot more GUI programs in the future, it'd be useful to jump into .NET and C#.

  32. Re:VB by Blakey+Rat · · Score: 2, Informative

    I'd actually recommend RealBasic instead of VB for a few different reasons:

    1) RB is cross-platform. (It can compile for Windows, OS X and Linux all from a single project.)

    2) RB applications are all bundled together with their libraries. That means you don't need a runtime like VB's, you can just copy the .exe file and you're installed.

    3) I find RB a little bit easier to use.

    http://www.realbasic.com/

  33. Re:VB by NickFitz · · Score: 2, Informative

    Not so. It's available for free download for a year, after which they'll start charging; however, copies downloaded free remain free and fully licensed. Not sure where you dug, as 4 clicks from the www.microsoft.com homepage will lead you to the pricing section of the FAQ:

    12. Do customers who acquire the Visual Studio Express products during the free promotional pricing period have to pay after the first year if they want to continue to use them? No, as long as you download Visual Studio Express on or before November 7th 2006, you will not have to pay for it.

    (For the navigationally challenged, the route is: MS homepage, "Developer Tools", "Visual Studio", "Visual Studio Express", and in the right hand column headed "Express Quick Facts" follow the link "Free for 1 year".)

    --
    Using HTML in email is like putting sound effects on your phone calls. Just say <strong>no</strong>.
  34. Re:VB by jbplou · · Score: 2, Informative

    How is C# any better than VB.NET, thats crazy. They compile to the same code, they are two routes to the same thing.

    Also anybody who develops .NET classes and then converts that code to PHP for Windows is crazy. I can't believe that people on this site hate Microsoft so much that they think using GTK# or PHP or Java will make a better Windows only app than .NET. .Net is currently the top development tool on the market for business apps PHP is a toy.