Need help with some VB programming
0
Like the title says, I'm doing something in VB and I need some help. My professor for my computer programming class that I'm in right now has us doing something called a bubble sort. I've got most of the code down. I'm just having difficulties with it displaying the correct output.
Here is what I've got so far:
What its supposed to do is sort some information in a .dat file and then create a new file with the information sorted.
For whatever goofed up reason, my computer won't allow me to take screen captures. So I'll have to describe what my form supposed to look like. It has a list box which will display the sorted data. There are also 4 buttons that are supposed to do exactly what they say, "Alphabetical Order", "Oldest to Youngest", "Oldest", & "Youngest". These different sortings would then be put into the new file as well as displaying on the ListBox. Any help would be appreciated. Also, I know I'm probably going to get called out for being lazy. I know that but I can't make heads or tails of what I should do next and the textbook isn't all too clear.
Here is what I've got so far:
Spoiler:
What its supposed to do is sort some information in a .dat file and then create a new file with the information sorted.
For whatever goofed up reason, my computer won't allow me to take screen captures. So I'll have to describe what my form supposed to look like. It has a list box which will display the sorted data. There are also 4 buttons that are supposed to do exactly what they say, "Alphabetical Order", "Oldest to Youngest", "Oldest", & "Youngest". These different sortings would then be put into the new file as well as displaying on the ListBox. Any help would be appreciated. Also, I know I'm probably going to get called out for being lazy. I know that but I can't make heads or tails of what I should do next and the textbook isn't all too clear.
0
This is not a 'debug my code' forum.
If your only problem is displaying the list of the sorted data it would seem faster to just ask a classmate to look over your code.
I will admit I have avoided VB like the plague, as it is the one of the worst languages out there, but I am still fairly sure that there is nothing relating to GUI in what you have posted, so how would you have us help you with a GUI problem if you do not post the code related to that? (point n' drag still generates code..)
If your only problem is displaying the list of the sorted data it would seem faster to just ask a classmate to look over your code.
I will admit I have avoided VB like the plague, as it is the one of the worst languages out there, but I am still fairly sure that there is nothing relating to GUI in what you have posted, so how would you have us help you with a GUI problem if you do not post the code related to that? (point n' drag still generates code..)
0
I tried to but at the end of class everyone takes off before I get a chance to ask anyone.
I'm not sure what you're talking about after that but if you're talking about the user interface this is what it looks like.
I'm not sure what you're talking about after that but if you're talking about the user interface this is what it looks like.
Spoiler:
0
What I was talking about was that you code does 3 things:
1. load some files
2. load some data into some variables
3. sort data
Nothing in that helps us identify your problem in trying to display your list. You need to post whatever crappy gui menu that is used to specify that you want to display the data in the list so we may be able to tell you what you do wrong.
Also the gui interface you have taken a picture of generates code, that code can be posted here too and you can fix the problem by correcting that code
1. load some files
2. load some data into some variables
3. sort data
Nothing in that helps us identify your problem in trying to display your list. You need to post whatever crappy gui menu that is used to specify that you want to display the data in the list so we may be able to tell you what you do wrong.
Also the gui interface you have taken a picture of generates code, that code can be posted here too and you can fix the problem by correcting that code
0
Tegumi
"im always cute"
liger0 wrote...

Just... Just forget it. Forget I even asked.
Jenslyn tried to help you despite the fact that this isn't a homework help forum, and that's the kind of attitude you return? Good luck with any subsequent threads you try to make in this forum.
0
Just wondering op did you look on google?
A quick google got me plenty of results.
Have a look at the sorting algorithms here and make sure your sorting algorithm is actually working properly.
I won't do your homework for you because learning to code is half the 'fun' of learning a language.
Here's what I suggest you do:
Read data
Sort it
Output to a txt/dat file
Then load that txt file into a listbox.
VB isn't a terrible language for little utilities but you need to keep your code clean and learn to code efficiently.
A quick google got me plenty of results.
Have a look at the sorting algorithms here and make sure your sorting algorithm is actually working properly.
I won't do your homework for you because learning to code is half the 'fun' of learning a language.
Here's what I suggest you do:
Read data
Sort it
Output to a txt/dat file
Then load that txt file into a listbox.
VB isn't a terrible language for little utilities but you need to keep your code clean and learn to code efficiently.
