heRO-Server Forum

Full Version: Programming in VB 2008
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so~ I need some programming help in VB 2008

Here is what I was doing in the program:

1. I made a combobox to get the location and phone number in a notepad named "Resources.txt"

IE:???? Museum Metro
???????? 604-111-9999
???????? 1???????????????????????????? <<<<No. of staff
???????? 3???????????????????????????? <<<<No. of tourist
???????? B???????????????????????????? <<<<B opens in the morning
???????? Gargoyle Rock
???????? 604-333-5555
???????? 2
???????? 5
???????? A????????????????????????????<<<<A means it opens at midnight

the combobox selections have something that displays like "Museum Metro 604-111-9999" (already finished)

2. I then made a listbox which copies the display in the combobox. (done)

3. Now I need to put the other informations from the "Resources.txt"
into Textboxes but since I made the variables into an array(which are universal in the program), I couldn't just put them inside it since it the array changes when you pick Museum Metro or Gargoyle Rock. Also I can't put the array in the textbox since its not a string and that it's an array as specified (having a hard time discovering)

I don't know if anyone actually knows of programming stuff but I think I need something like

For icount = 1 to 15
?????? strPhone = strPhoneNum (or something like that.....)

I don't actually know how to make this thing work but I need to get the phone number which is displayed into the combobox and then use it to find the other things in the "Resources.txt" into textboxes as well.

Mad

EDIT: ever wonder why I don't draw that much? It because of this stuff >>
I'll be the douchebag of the thread and say "Why don't you use a REAL programming language?"
G?n?ral_Argos Wrote:I'll be the douchebag of the thread and say "Why don't you use a REAL programming language?"
glad you where the douchebag ;P allthough VB is a very powerful programming language for beginners. It teaches you the basics of programming in an easy manner. ;P

And sorry story I can not remember much VB, xD than again I never knew very much.
G?n?ral_Argos Wrote:I'll be the douchebag of the thread and say "Why don't you use a REAL programming language?"

[Image: real_programmers.png]

EDIT: As for help, sorry, I don't remember much from my VB days.
I was "specifically" asked to use this program if you guys are going to tell me why I am using VB 2008. If you want me to post the coding I did for this one then I can post it.
@story
If you post your coding I may get triggered mentally. And remember something but doubt it XD
Ok, just to update you guys. I am almost done programming this thing. The only problem is that I need some help on how to remove the time in the date.

here is the code I tried using:

Dim strCheckIn As Date = CDate(FormatDateTime(CDate(txtCheckInDate.Text)))

What appears in the listbox I made is:

20/11/2008 12:00:00 AM

My Problem: How the hell do I get that 12:00:00 AM out of there Mad
HOMEWORK COMPLETE >:D

it seems like i had an overflow of data in the date that's why it didn't work. :D
Reference URL's