tags:

views:

359

answers:

8

I am looking to create a very lightweight GUI front end in Windows. It's supposed to do a simple task - when a hot key combination is pressed it opens up a text box. Any text can be pasted in and then saved with a simple text box. I am looking to avoid any menu bar or toolbars at all.

What would be the ideal GUI library to create something like this?

+2  A: 

Assuming you have Visual Studio, .NET would be the easiest to get this up and running in the shortest time.

Andrew Grant
But is that really light weight?
Brettski
It depends which criteria you wish "lightweight" to apply to.
Andrew Grant
It needs to run in the background so that it can pulled up in a snap real quick with a hot key combination and then disappear with escape
vivekian2
A: 

Lightweight frameworks were the domain of ATL/COM for a long time.

For something this simple with the primary goal of being lightweight, I would say to use no GUI library at all. All the UI elements are available via direct API call. I would recommend picking up a copy of Charles Petzold's Programming Windows, which covers how to do this in detail.

Jekke
A: 

MFC, Win32, WinForms, .NET forms ...

For such simple application, you should use what you know best (language and framework).

If you know nothing (it happens, don't worry about it), and you wan to learn, C# could be easier and less of a hassle to setup than to have to install 3rd party toolkits and frameworks (wxPython, tk/tcl, QT, ...)

Max
winforms = .net forms
SnOrfus
thanks, I was thinking about C# vs. C++ and put down both even if they are the "same"
Max
C# isn't a GUI toolkit, it's a language. Did you mean to refer to Windows Forms?
Rob
+2  A: 

I'd knock something up using WTL - the footprint will be small - probably the next best thing to a raw Win32 app written in C. There won't be much in the way of dependencies to worry about for example, which might be important.

WTL is available from Source Forge:

http://sourceforge.net/projects/wtl

There are some excellent articles on Code Project to get you started. The WTL download can install a WTL Application Wizard for Visual Studio that will give you a bare-bones app with a few mouse-clicks.

Rob
+1 beat me to it...
Aardvark
+2  A: 

What exactly do you mean by "light weight"? If the absolute minimum amount of system resources is important, you should code it Petzold style using 'C' and the raw Win32 API. It will take you a couple of days, give or take.

If "light weight" means, "I want to do this in an hour and be done with it" (possibly quicker than waiting for an answer at SO), you should code it with a RAD tool like Windows Forms. It will definitely use a lot more resources than the 'C' version. It is however very unlikely that you'd ever notice.

Hans Passant
By lightweight it should not be a drag on system resources and really snappy for the end user. Also from the UI side, it should be clean -- no edges, no menus just a plain simple text box.
vivekian2
A: 

I haven't done a lot in it, but I'll second using Visual Studio with C# to get your front-end up. The GUI tools for making other GUIs are pretty good, so you can probably be done really quickly.

If you have total control over what you are going to use, I'd actually recommend using Java Swing. It's got a bunch of classes that do most of the stuff that you want that plug really easily into each other. As a benefit, if you ever need to, it ports to other platforms essentially for free. However, you'll certainly want to look at a tutorial because it operates differently from most other libraries, but you'll want to do that for any framework.

If you need to be in C++, then you'll probably want to look into using MFC, but there are much better frameworks available for other languages.

James
+1  A: 

The question is pretty broad, but I'm partial to markup-based UIs. Here's a window with a text box in WPF:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;
    <Grid>
      <TextBox x:Name="InputBox"/>
    </Grid>
</Window>

Now I won't even try to claim that WPF has the shortest learning curve, but it is the most powerful on Windows and it's pretty easy to pick up with the right tooling. (i.e. Expression Blend). Blend isn't cheap but some folks already have it for free and don't know it (students, MSDN subscribers, some startups). Visual Studio 2010 is much improved in this area too, so Blend may not be needed.

Jared Bienz - MSFT
A: 

It's probably still workable to do this with a VBS script file, and the standard COM libraries. Probably even easier with PowerShell.

le dorfier