Kernel32 wrote: VB3 to VB6 which was what I used to do the bulk of my development up until .Net Beta 1 put many thousands of dollars, pounds and euros into my bank account. No matter how much I didn't like working with it sometimes it will always have a special place in my heart.
rsynnott wrote: VB (especially pre-.NET) makes it quite easy for frighteningly stupid people to write programs which at first glance look okay. This is not a good thing; such programs are invariably broken.
me: Why did you add those frames-within-frames-within-frames, and why are you using purple, green and pink for frame-titles.developer: Coz it looks nice. Its boring when you make an application look like a boring, ordinary windows application.
The Corinthian wrote: However being too user friendly is a new one on me. Do you mean it is not strict enough on data types or has an easy to use IDE?
Achilles wrote: VB in my eyes is almost too user friendly, hence the 'inspiration' behind my original comment.
That said tho the Java teacher is straight out of college herself and can barely explain the bloody language to us.
Hobbes wrote: It was a toy language 10 years ago prehaps.
Other then that, your second post back is spot on. Should almost go into the charter.
bonkey wrote: Please Achilles. Ignore these clowns. VB is a toy language, and no-one writes real applications in it.
The Corinthian wrote: Where the OP went wrong is, as has been pointed out, by insulting the people he was seeking help from - not too bright.
rsynnott wrote: Any question which can be trivially answered through use of Google or a bit of common sense should not be answered here.
Laguna wrote: OK now, let me see if I've got this right.. This is the Programming forum... yes? Why is it taboo/forbidden for people (especially 'newbies') to ask Programming questions?
Anytime anyone ever asks a question that has a *hint* of a college assignment from it, you're all down their throat deeming yourselves to have carte blanche to pick apart everything and anything they say
Kernel32 wrote: Hobbes went one step further and supplied a line of code. I'm not sure what more is needed?
Laguna wrote: That's not a helpful comment, I think the charter should say something about posts saying RTFM/unhelpful comments? (if it doesn't already).
Laguna wrote: Besides, I had a look at the link, it provides no answer to the mans question, it's not even close.
Trampas wrote: Typical college student comment about Visual Basic not a programming language.
I can be damned if i'm changing all the file paths (the above aint the only instance in my program of where code is read from a text file) if I'm changing all of the paths manually
Beano wrote: sin é
Open as #1 filePath = app.path & "\" & "coins.txt"
bonkey wrote: No, there isn't. There is a way to open it from the same location/folder as the compiled .exe, but - as has been pointed out - when working in Debug mode this will look for the file in the same location as where the .vbp is stored. IN either case, this may be the same folder as "the form" (by which I can only assume you mean the .frm), but that would fall into the category of "programming by coincidence" in my book. Why not look at the FileOpen Dialog, and simply get the user to select the file they want to read the values from? Or use a .INI file with the app? jc
Achilles wrote: But surely there's a way to get it to open variables.txt from within the same folder as the form.
Achilles wrote: Jesus christ I never should have posted here in the first place. Any time anybody asks for help you always pick apart every little thing that the user asks. The program we were asked to create is a Vending Machine Simulation Program. I've explained what I'm trying to do as best as I can. Basically I'm looking to input 5 variables into 5 seperate text files that are retreaved from a text file, do this like so: Open "M:\College\CP2\Visual Basic\Vending Machine Project\stock.txt" For Input As #1 Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock Close #1 txtCokeQuantity.Text = CokeStock txtDietCokeQuantity.Text = DietCokeStock txtFantaQuantity.Text = FantaStock txtLiltQuantity.Text = LiltStock txtSpriteQuantity.Text = SpriteStock As you can see, for it to work I have to give it the full path of the directory, which in this case is my pen drive. The problem I will have later is if I want to work on it on a college PC or when I submit it on a floppy discs, the paths won't be correct and I can be damned if i'm changing all the file paths (the above aint the only instance in my program of where code is read from a text file) if I'm changing all of the paths manually. If I do something along the lines of this:Open "stock.txt" For Input As #1 Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock Close #1 txtCokeQuantity.Text = CokeStock txtDietCokeQuantity.Text = DietCokeStock txtFantaQuantity.Text = FantaStock txtLiltQuantity.Text = LiltStock txtSpriteQuantity.Text = SpriteStock Then it doesn't work. So how do I get it to read the variables from a text file?
Open "M:\College\CP2\Visual Basic\Vending Machine Project\stock.txt" For Input As #1 Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock Close #1 txtCokeQuantity.Text = CokeStock txtDietCokeQuantity.Text = DietCokeStock txtFantaQuantity.Text = FantaStock txtLiltQuantity.Text = LiltStock txtSpriteQuantity.Text = SpriteStock
Open "stock.txt" For Input As #1 Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock Close #1 txtCokeQuantity.Text = CokeStock txtDietCokeQuantity.Text = DietCokeStock txtFantaQuantity.Text = FantaStock txtLiltQuantity.Text = LiltStock txtSpriteQuantity.Text = SpriteStock
Achilles wrote: Jesus christ I never should have posted here in the first place. Any time anybody asks for help you always pick apart every little thing that the user asks.