Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 06-30-08, 11:24 AM   #1
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default A bit of help needed to make a simple program

I need to make this program for work. I have Visual Studio 2008 and I can work with C++, C# and Basic.

A bit of background -> just finished 3rd year computer engineering. Mostly worked with command line C++ and Java (and GUI with Java) at school. I know most things (or so I think) about object oriented methodologies and concepts and how I should be using them. I usually get a lot of help from my classmates when doing programming assignments, but I did pretty well on the programming final (which I studied a lot for, since I knew it wouldn't be easy for me).

Anyway, I need to make a simple GUI (windows) that has two text fields. One is user editable and the user puts in like a sequence of numbers (binary sequence I believe), so I guess a string basically. Then there is a dropdown menu that you select the type of conversion you want. The second text field is the result from the input you selected and the type of conversion you want to get. Long story short, user puts in a binary sequence, selects the "protocol" they are using from the dropdown menu, and then the CRC sequence for that protocol is shown in the second textfield depending on your input.

There's a couple algorithms for how to get the CRC sequence from the "message", and I can get these from my co-workers. I need to make the GUI interface for this basically and implement these algorithms for the respective option you choose from dropdown menu.

I don't want someone to do the code or anything like that for me, I just want to be pointed in the direction I should be going (hopefully a website that really helps with this, some sample of code from a similar type program or sample of code from a simple GUI interface, something like that).

Thank you for any help.

EDIT: Just realized the program I want to make is basically like those HEX/Binary Converter programs, where you have a text field to put in your message, and a bunch of options to select (Binary To Hex, Hex to Binary, Octal, Decimal, etc.), except I'm using a different algorithm to get the "result".
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote
Old 06-30-08, 04:02 PM   #2
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: A bit of help needed to make a simple program

youll probably hate me for saying this, but i would do it in C#. visual studio would make it much easier, but it can be done in a single text file without it.

all you need is a static drop list with all options, then an event to update a disabled text field (or a label) whenever the user input textbox is changed. the output will be dependent on what the droplist says via simple if statements. there's many built-in functions in the .NET framework that can be used to convert between formats.

that would require the .NET framework. this would take about 10 minutes lol.
ViN86 is offline   Reply With Quote
Old 06-30-08, 04:17 PM   #3
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default Re: A bit of help needed to make a simple program

Quote:
Originally Posted by ViN86 View Post
youll probably hate me for saying this, but i would do it in C#. visual studio would make it much easier, but it can be done in a single text file without it.

all you need is a static drop list with all options, then an event to update a disabled text field (or a label) whenever the user input textbox is changed. the output will be dependent on what the droplist says via simple if statements. there's many built-in functions in the .NET framework that can be used to convert between formats.

that would require the .NET framework. this would take about 10 minutes lol.
Problem here is I've only coded command line C++ and GUI Java so using Visual Studio and modern C++/.NET is not exactly second nature to me.
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote
Old 06-30-08, 09:27 PM   #4
jcrox
Mahna Mahna
 
jcrox's Avatar
 
Join Date: Jul 2006
Location: Madison, Wi
Posts: 6,134
Default Re: A bit of help needed to make a simple program

Not knowing your level of knowledge in regards to Visual Studio I'll try and explain it as simply as possible..... I'm not trying to insult you, I just don't want to assume you know something so bear with me.

Start Visual Studio
File -> New Project

In the next screen enter your project's name in the text box on the bottom, select Windows Application and click next.

From the toolbox drag and drop 2 text boxes and a combo-box into the GUI

Click on the combo-box and then in the properties window(usually on the bottom right) enter a "name" property for the combo-box (cmbChoices). Repeat with each text box (txtStart, txtFinish). Set the Read Only property of txtFinish to true.

Select the combo-box again and in the properties window enter the values you want in the drop down list in the "Items" property (should say "Collection") next to it.

Double click on the combo-box, this will take you to the code behind screen and create an event handler for the combo-box.

Event Handler:

Private Sub cmbChoice_SelectedIndexChanged(ByVal sender As System.Object, ByVal e as System.EventArgs) Handles cmbChoice.SelectedIndexChanged

insert your code here

End Sub

You can use if....then statements, case statements.... what ever your heart desires here. For example if I was doing temperature conversion using VB.NET


Dim choice as String = cmbChoice.SelectedItem.ToString()
Dim temp as double = CType(txtStart.text, double)
Dim result as double
if choice = "Celcius" then
result = insert f to c equation here
txtFinish.text = result
else
result = insert c to f equation here
txtFinish.text = result
end if


does that help at all?
__________________

Gaming

MSI MPower Z87 | 4770k | CNPS9900MAX-B | 8GB G.Skill 1866 | EVGA GTX760 |ThermalTake 850w | X-Fi Titanium | HAF | Asus PA248Q | Lycosa | Death Adder | Win8 Pro 64

Dev/Backup

MSI GD65 | 2500k | H50 | 8GB G.skill | GTX570 | Ubuntu 13.10

Laptop

17" Inspiron | i5 | 4GB DDR3 | 500GB HDD | Win7 Pro 64

jcrox is offline   Reply With Quote
Old 07-02-08, 11:48 AM   #5
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default Re: A bit of help needed to make a simple program

Yes this helps a LOT actually. I was worried about making code in such a way that the 2nd text box is read only and how to make the dropdown menu properly (i.e. click outside of the dropdown menu to close it), but this really helps a lot. Now I just need to put some titles, get the right algorithm for the operation I do on the input from my co-workers and that'll be it.
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote
Old 07-02-08, 03:08 PM   #6
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: A bit of help needed to make a simple program

Quote:
Originally Posted by MustangSVT View Post
Yes this helps a LOT actually. I was worried about making code in such a way that the 2nd text box is read only and how to make the dropdown menu properly (i.e. click outside of the dropdown menu to close it), but this really helps a lot. Now I just need to put some titles, get the right algorithm for the operation I do on the input from my co-workers and that'll be it.
you can change the text in boxes from anywhere in the code. maybe you were thinking of C++ where you have private variables that you cannot change from other sections of code without a global variable?

you can also add events. so you can add an event that updates the output box when the dropdown menu is changed, or when the input value is changed, as jcrox demonstrated so perfectly.
ViN86 is offline   Reply With Quote
Old 07-02-08, 03:44 PM   #7
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default Re: A bit of help needed to make a simple program

Quote:
Originally Posted by ViN86 View Post
you can change the text in boxes from anywhere in the code. maybe you were thinking of C++ where you have private variables that you cannot change from other sections of code without a global variable?

you can also add events. so you can add an event that updates the output box when the dropdown menu is changed, or when the input value is changed, as jcrox demonstrated so perfectly.
Yup I added event when mouse clicks outside of the input button, I also check that the dropdown selection is not empty when updating and I made an "Update" button in case of any weird scenario where the output might not be changed after editing the input field.

Now I'm at the actual hard part. The algorithm to get the CRC code appears is a lot harder than I first thought. It'll take me some time to get this working properly. I need to parse some hex strings (bytes) with spaces in between them and then examine them in a weird fashion.
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote
Old 07-08-08, 01:16 PM   #8
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default Re: A bit of help needed to make a simple program

Ok guys well I finished the program. It works very well. Thank you everyone for your help.
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote

Old 07-09-08, 09:39 AM   #9
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: A bit of help needed to make a simple program

Quote:
Originally Posted by MustangSVT View Post
Ok guys well I finished the program. It works very well. Thank you everyone for your help.
glad to hear you got it workin
ViN86 is offline   Reply With Quote
Old 07-21-08, 12:00 PM   #10
MustangSVT
Stop looking at me
 
MustangSVT's Avatar
 
Join Date: Jul 2004
Posts: 1,602
Default Re: A bit of help needed to make a simple program

I have a new task I might be working on now. I need to make an installer for an application. You know, something that will enter in data into registry and put it in start menu and all that.

So far I've figured out that NSIS (NullSoft InstallShield) i think, a program made by people who made WinAmp is the way to go. What do you guys think?
__________________
1. Q6600 @ 3.2, ASUS P5Q Pro Turbo, Powercolor HD 4890 CrossFire, 4GB Mushkin DDR2-1066, 3x 24" LCD, Matrox TripleHead2Go, Audigy 2 ZS

2. Q9550 @ 3.7, ASUS P5K, Galaxy 8800GT G92, 2GB Mushkin DDR2-1066, Samsung 710N + Samsung 205BW, Audigy 2 + SB Live! 5.1 (hooked up together, really), dad's comp

3. XP-M 2500+ @ 205x11.5, Gigabyte nForce2-400, GeForce4 Ti4200, 2x512MB OCZ DDR-400 "Premier", oldie
MustangSVT is offline   Reply With Quote
Old 07-21-08, 12:06 PM   #11
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: A bit of help needed to make a simple program

Quote:
Originally Posted by MustangSVT View Post
I have a new task I might be working on now. I need to make an installer for an application. You know, something that will enter in data into registry and put it in start menu and all that.

So far I've figured out that NSIS (NullSoft InstallShield) i think, a program made by people who made WinAmp is the way to go. What do you guys think?
you could create your own MSI (windows installer) file.

http://searchwincomputing.techtarget...175396,00.html

seems like that would be the ideal way for installing the program in windows.
ViN86 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reinstalling nVidia Drivers after a kernel compile Rukkh NVIDIA Linux 5 08-22-02 02:29 AM

All times are GMT -5. The time now is 02:20 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.