Thread: Help with Windows forms application - NOOB ALERT

  1. #1
    Registered User
    Join Date
    Mar 2012

    Help with Windows forms application - NOOB ALERT

    Hello I'm at college at the moment and I've just started playing around with Visual Studio 2010 and creating a simple GUI applications.

    I have made an application that will install a product key or OEM certificate to Windows 7. It's quite a basic process and uses system commands to do so. I chose to make this simply to make it easier for me to install product keys etc on a fresh install

    This is what I have:

    Help with Windows forms application - NOOB ALERT-consolescreenshot18-jpg

    It works fine but it does not give the user any option as to which key/certificate to install.

    I have added the menuStrip and filled it with data but how can I have the user select a key and the when press "Install Key" to install that key?

    Any input or guidance is greatly appreciated.


  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Oregon, USA
    Shouldn't the user be entering the product key? It should be tied to their individual purchase, right?
    If you understand what you're doing, you're not learning anything.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Based on your UI you need to populate the combo box with items. Then you need to respond to the combo box selection changed event to detect when an item has been selected. However I would think an edit control would work better for this type of input since you can easily use a regular expression with it. Product keys usually have a specific format and you need to validate the input to ensure it is in the correct format. Microsoft has the best method for entering product keys where each edit control is exactly the size it needs to be and each edit control can be tabbed through as well as auto tab through as you type in the key. A combo box is not the best control for this task.

    As to the buttons you will need to respond to their click events and then write the appropriate handler code or call out to a common method to perform more processing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segmentation fault on printf() [NOOB ALERT]
    By Richardcavell in forum C Programming
    Replies: 2
    Last Post: 02-26-2011, 06:44 PM
  2. VS2008"Windows forms application"
    By almawajdeh in forum Windows Programming
    Replies: 7
    Last Post: 06-05-2010, 03:49 AM
  3. Listbox in windows forms application
    By starcatcher in forum Windows Programming
    Replies: 0
    Last Post: 04-17-2010, 11:20 AM
  4. Windows Forms
    By ejohns85 in forum C# Programming
    Replies: 2
    Last Post: 05-17-2007, 03:22 PM
  5. Which one :MFC, Win32, Windows Forms (.Net)?
    By Robert_Sitter in forum Windows Programming
    Replies: 6
    Last Post: 11-17-2005, 06:15 AM