1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Question about GUI Program Design

Discussion in 'Software' started by g2tegsown, 17 May 2012.

  1. g2tegsown

    g2tegsown What's a Dremel?

    Joined:
    28 Jan 2007
    Posts:
    31
    Likes Received:
    0
    Hello,

    I have a desire to find a way to create a small little program that shows your video games as graphics similar to the large icon view in steam... EXCEPT... It does nothing more than just launch the games themselves (Doesn't update or save games, etc...).

    A Game launcher if you will...

    How would I get started in doing that? Any help is greatly appreciated... I mean I don't know what code I should be looking at or if there is a "code tool" like dreamweaver that designs them (Graphically not functionally).

    Thanks :wallbash:
     
  2. GoodBytes

    GoodBytes How many wifi's does it have?

    Joined:
    20 Jan 2007
    Posts:
    12,300
    Likes Received:
    710
    You have multiple options available.
    (no orders)
    -> Java
    -> C#
    -> C/C++ using Windows Forms (MFC)
    -> C# using Microsoft XAML (.NET) - For Windows Presentation Foundation (WPF) or Silverlight
    -> Flash + Third party software to make 100% stand alone applications out of of a Flash project (it means no Flash plug-in required to run them). Third Party software also extends Flash to use many Windows API.
    -> Visual Basics

    Basically the more OS "native" you go, the more complicated and free it is.

    The fastest and easiest way, and I think, the way that can learn you the basis of programming including object oriented programing, all in a graphic environment like Microsoft Paint (coding is still required), working in a world where you don't care about window creation, memory management or anything like that, and you can do any wacky looks you want.. Zune, Steam, native Windows.... Flash + third party software is your biggest friend. However, you needs to purchase 2 software.

    My personally recommendation is this way, as you don't know coding, and I think Flash ActiopnScript 2.0 or 3.0 can give you a good start to programming. While other languages you want to work with command line programs to learn how to code first, (which can get people off) and then once a bit more comfortable venture in interface, Flash allows you to directly dig in doing a visual interface. You'll need to learn ActionScript which is close to Java-Script so it's not hard, and it's like learning 2 languages in one, as they are very similar. Also help you transition to Java, and even C++, in terms of how the code looks. Flash is very visual base. And I think it can be very helpful in learning procedural programming and how it works, as well as an introduction to Object Oriented programming in a visual way. Where Objects are actual objects, which you can work with and interact with. It's a shame that their isn't any free Flash editor to get started. But there is a 30-day trial. And of course for both software you have substantial student discounts.

    Second easiest way, involves more coding needed. But you can do it for free, using Virtual C# Express edition 2010 (http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express) You'll need to learn C# and venture in .NET. While you need to ensure .NET compatibility with different version of Windows, you can make programs looks like native Windows ones, while with Flash.. you can't and have to recreate everything. C# is close to C++.

    Third easiest way is Java. You can developer Java using NetBeans editor or Eclipse. Java projects uses it's own interface, but easy to make. The downside is that your project will take time to load (much slower than method 1)

    Forth way, is to use C# + XAML. This method allows you to make interfaces like Zune software (it uses that), and do web base apps made in Silverlight. Doing a native Windows look-a like software is, like Flash, involves a bit more work though. You get to use Microsoft Expression Blend (not free) to do the layout, or/and use Visual Studio's (not sure if it's available for free)

    Fifth way, is C/C++ using MFC. You need to learn C/C++ first, be comfortable with it, as you need to know what pointers are, learn Windows specific data type, memory management, and object oriented programming, and of course MFC which on it's own is complicated. Also you'll need to find a way to decode and load pictures for specific formats and use them in your project. Also you MAY need to know how to work with libraries for your project. However, you can use Visual C++ Express to do this (free): http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express, or other free compilers like GCC.

    Visual Basics uses a language that isn't close to C/C++ in any way. It kinda sits on it's own. You need Visual Basic Express. However you get to make Windows native.

    If you go or at least interested (you get the trial version of both) with the Flash + SWF Studio path , I can help A LOT. It's really easy to do.
     
    Last edited: 17 May 2012
  3. Dae314

    Dae314 What's a Dremel?

    Joined:
    3 Sep 2010
    Posts:
    988
    Likes Received:
    61
    Excellent post as always GB :).

    Personally, if you're trying to make this just for yourself, I would go with .NET. Easy to design stuff to integrate with Windows in there. You're going to need to set up functions that scan your computer for "games", and .NET can interact with the Windows file system easily. I say all this assuming you're working in the Windows environment xD.

    If I remember correctly, visual studio comes with a graphical GUI editor that you can use to design your window too. It'll take you a while to learn how to program in that environment though.
     
  4. GoodBytes

    GoodBytes How many wifi's does it have?

    Joined:
    20 Jan 2007
    Posts:
    12,300
    Likes Received:
    710
    Thanks
    Very true, but I don't think he will need that, because he needs the game picture associated with the game. The games don't have these picture (unless he wants the game icons instead)

    This is what I have in my head on how to this.
    * Use Access Database using ADO (Access Database is in built-in Windows since XP, so no extra stuff to install.. even though it's a bit excessive for such small program, finding better solutions later on can be made and it's a good start for him).
    This database will use 1 table (let's call it Games) with the following columns:
    - ID
    - Name (the game name)
    - Path (the full path to the game executable. This is needed to run the game).
    - GUID (randomly generated code which will be the game ID to identify the game picture, to avoid any conflicts, including when sharing in any way his pictures or merging or updating the databases of another system). (It's a windows thing you can call to generate that number for you).​
    1- Program starts, connects to the database (fairly straight forward), and execute the SQL command: SELECT * FROM Games (it means get everything on the table name "Games" that we created).

    2- Pass through the received results using a for loop, where for each entry (if any): create and position and object in a panel, which you will load the game picture that was stored using the GUID value stored, and set the path to the button that will make the game run.

    3- Have a button on the program that when you click on it, you get an input box asking the name of the program, and then once clicked on OK, the Windows Open dialog box will show to select the game executable (the program will get the full path to the executable, once it's selected on that open dialog box), and followed by another one to select the picture to import and use.

    3a- Once done, it generates a GUID code to be used right after.

    3b- Copies the image file select to "AppData\Roaming\<Program Name>\Pictures" (let's assume a standard Windows configuration, local, no domain, nor use any special group policy which could change the path for now), with the <GUID code that was generated>.jpg (or .png or bmp, which ever you wish to support) as file name.

    3c- Execute the SQL command to the already connected database: "INSERT INTO Games ([Name],[Path],[GUID]) VALUES ('"+gameNameEntered+"', '"+gamePathSelected+"', '"+guidCodeGeneratedForTheGame+"');"[/indent]

    3d - Delete all objects, and execute code "#2" to refresh (let's not break our head with some optimizations for this first project)

    Correct you are. But I don't know for sure if it's on the Express edition of Visual Studio.
     
    Last edited: 17 May 2012
  5. azrael-

    azrael- I'm special...

    Joined:
    18 May 2008
    Posts:
    3,852
    Likes Received:
    124
    I'd have a look at the Qt Framework as well. What the OP is interested in doing can be achieved in very short time, probably in under an hour. Does require some knowledge of C++, Java or JavaScript, though.
     
  6. GoodBytes

    GoodBytes How many wifi's does it have?

    Joined:
    20 Jan 2007
    Posts:
    12,300
    Likes Received:
    710
    I had some free time a moment ago, so I made this to show off what you can do easily with Flash + SWF Studio.

    I copied the Steam look :p
    [​IMG]

    Here what it looks like in Flash:
    [​IMG]

    Download: http://tinyurl.com/6q2ltzg
    (executable and full source code included)
    Give it a spin!
     
    Last edited: 17 May 2012

Share This Page