|
|
#1 | |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
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 |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Mar 2004
Posts: 15,486
|
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. |
|
|
|
|
|
|
#3 | |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
Quote:
![]()
__________________
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 |
|
|
|
|
|
|
#4 | |
|
Mahna Mahna
Join Date: Jul 2006
Location: Madison, Wi
Posts: 6,123
|
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?
__________________
|
|
|
|
|
|
|
#5 |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
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 |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Mar 2004
Posts: 15,486
|
Quote:
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. ![]() |
|
|
|
|
|
|
#7 | |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
Quote:
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 |
|
|
|
|
|
|
#8 |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
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 |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Mar 2004
Posts: 15,486
|
|
|
|
|
|
|
#10 |
|
Stop looking at me
Join Date: Jul 2004
Posts: 1,602
|
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 |
|
|
|
|
|
#11 | |
|
Registered User
Join Date: Mar 2004
Posts: 15,486
|
Quote:
http://searchwincomputing.techtarget...175396,00.html seems like that would be the ideal way for installing the program in windows. |
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reinstalling nVidia Drivers after a kernel compile | Rukkh | NVIDIA Linux | 5 | 08-22-02 01:29 AM |