Jump to content

Visual Basic


TheGeek

Recommended Posts

Hello,

I use visual basic 6 at my school and i like it alot. The thing is i want to get something like visual basic but cant afford to buy it. Does anyone know any other kind of baisc compilers with a gui that are free and close to vb 6. I looked at real basic but it also costs 100 bucks.

 

thank you in advance

Link to comment
Share on other sites

Yah, that's the "Academic" edition, which is a pretty good deal. I've seen it for less on the Internet -- as low as 80 bucks. If you go that route you might want to get a newer version. VB.NET 2005 is due out in a few weeks. Interestingly, you can download the final beta of that product for free, but it will expire in a few months. They also have "demo" versions that are also free but they expire as well. You can't do the old set-the-clock-back trick, but you can reinstall the OS which is sometimes an option (and good practice) for us student types.

 

I would definitely check into the free Java IDEs, but that will mean learning a new language I'm afraid. It's worth it -- it's a very powerful language -- but it won't be the same. If your goal is a career in IT management, this is not your best option. If your goal is computer science/programming, this is the best step.

 

NetBeans, Eclipse and JBuilder are among the most popular. I'm a bit of a NetBeans fan, and it's easy to use, but if I remember correctly lacks GUI form layout tools. JBuilder has that and uses NetBeans underneat, as I recall. Kinda going by memory here -- it's been a few months since I've used Java, but I need to dig back into it because I've got a project coming up. (sigh)

Link to comment
Share on other sites

If I'm not mistaken, once they go to full release the "Express" editions will price at ~$100. The full version of VB.NET 2005 I believe will fall in the ~$300 range, with the "traditional" Visual Studio package being at least twice that.

 

IMO that's one of the biggest problem areas for Microsoft. I applaud the Express approach, but I think it's a flaw that they look on their IDE, which is arguably the best in existence, as a profit center rather than what it should be -- an entry point in capturing and maintaining mindshare.

 

Ah well, I guess I'm preaching to the choir here. (grin)

Link to comment
Share on other sites

Ah well, I guess I'm preaching to the choir here. (grin)

 

Quite. The cost of the developing tools for Windows is precisely the reason why I don't bother developing applications. Why bother when I can use X and GTK for absolutely nothing?

Link to comment
Share on other sites

I know there are limitations but you'll have to check the Express web site on that. I would guess that various data access methods are restricted. But I really haven't looked into it yet. I've been sticking with .NET 1.1 until we get closer to release, although I'll probably be looking into this pretty carefully around mid-August.

Link to comment
Share on other sites

Was wondering if anyone here could help me with a little problem with vb. Im trying to make a program that:opens a text file, goes to the end, and adds 1 line of code. So that basically every time i clicked the button, the text file would have 1 more line in it. This is what ive made so far, but it doesnt work for some reason:

 

Private Sub Command1_Click()

Dim before As String

Open ("C:\news.txt") For Input As #1

While Not EOF(1)

Line Input #1, before

Wend

Close #1

 

Open ("C:\news.txt") For Output As #1

Do Until EOF(1)

Seek #1, Loc(1) + 1

Loop

Print #1, before & vbCrLf & "new text line"

Close #1

End Sub

 

Im not that great at vb, not sure if ive gone about this all the wrong way or what, but would really appreciate any help.

Link to comment
Share on other sites

Below is a piece of code that i wrote.This code will add a birthday and the persons name to the file.

ask if you have any questions.

 

 

Private Sub cmdaddline_Click()
Dim intfile As Integer
intfile = FreeFile
Open "C:/computer prog/semester 2/birthday.txt" For Append As #intfile
Dim user As String
Dim birthday As String
user = InputBox("Enter the name of the person.")
birthday = InputBox("Enter the birthday of the person.")

Write #intfile, user, birthday
Close #intfile
End Sub

 

if you have vb .net then check out this link:

http://www.freevbcode.com/ShowCode.Asp?ID=4492

Link to comment
Share on other sites

TheGeek,

 

Hello' date='

I use visual basic 6 at my school and i like it alot. The thing is i want to get something like visual basic but cant afford to buy it. Does anyone know any other kind of baisc compilers with a gui that are free and close to vb 6. I looked at real basic but it also costs 100 bucks.

 

thank you in advance[/quote']

You can always use VBA, its included free with Microsoft Products. Its limited, but as long as you dont need to create EXEs then it should be good enough.

 

I taught myself how to program in Visual Basic using VBA in Excel, and I'm glad I did because in my field, I have to do a lot of calculations and predictions, and VB makes it really really easy.

 

 

Luminous,

Private Sub Command1_Click()

Dim before As String

Open ("C:\news.txt") For Input As #1

While Not EOF(1)

Line Input #1' date=' before

Wend

Close #1

 

Open ("C:\news.txt") For Output As #1

Do Until EOF(1)

Seek #1, Loc(1) + 1

Loop

Print #1, before & vbCrLf & "new text line"

Close #1

End Sub

 

Im not that great at vb, not sure if ive gone about this all the wrong way or what, but would really appreciate any help.[/quote']

There are lots of problems with that code.

 

  • In the first loop, you are opening the file line-by-line, and storing each line a variable called "before". This is bad because first, you can open a file all at once.
     
    To read a file all at once, use this:
    Open App.Path & "\myFile.txt" For Input As #1
        txtMain.Text = Input(LOF(1), #1)
    Close #1


     

  • And second you are writing over the "before" variable without storing the contents of it in another string - so, in the end, when you get to your second loop, you only have the last line of your text file.

 

Using two different loops to open up all of this is too much work anyway, because you can always use the Append keyword. Try this:

Open "C:\news.txt" For Append As #1
   Print #1, "Hello world"
Close #1

Link to comment
Share on other sites

I taught myself how to program in Visual Basic using VBA in Excel, and I'm glad I did because in my field, I have to do a lot of calculations and predictions, and VB makes it really really easy.

 

Heh, I wish I'd know that earlier. I just taught an Excel VBA class last week, and I told the class that it was a great introduction into programming. I just didn't have an example of anybody I knew who'd gotten into programming that way. It's amazing how many "real" programming concepts I have to put forth in that class. Objects (=nouns, methods=verbs, properties=adjectives), variables and data types, parameter passing (by ref as well as by value!), procedures vs functions, and more. It's amazing what a great intro to serious OOP that makes.

 

Anyway, now I do know someone like that, which is cool. :)

Link to comment
Share on other sites

Thanks alot In My Memory and TheGeek. Yeah, i figured i was doing something very wrong, and in the end i really just confused myself and had no idea where to even look for what was wrong. Guess the biggest problem was that i didnt know about the open for append funtion. Well, anyways, thanks again for the help guys.

Link to comment
Share on other sites

Yeah, i figured i was doing something very wrong, and in the end i really just confused myself and had no idea where to even look for what was wrong.

Yeah, i've had those times. I just start over. It's time consuming but worth it.:)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.