Scrolling Game Development Kit Forum

General => Off-Topic => Topic started by: sam on 2006-05-19, 07:30:35 PM

Title: Visual Basic 6 Professional
Post by: sam on 2006-05-19, 07:30:35 PM
Hey, sorry for the mass amount of new topics. I know SGDK was made with Visual Basic 6. And a couple of weeks ago I took a small one-day "mini-enrichment" course about it. I made a Tic-Tac-Toe and Number Guessing game. I've been recently looking around for it and have found out that it is kind of hard to buy. I found a couple on eBay but it's pretty scarce. To buy it from Microsoft I'm pretty sure the only way is to buy it with Visual Studio which costs about $1000 CDN. Which brings me to my question, where did you (bluemonk/anyone who has it) buy it?
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-20, 07:42:08 AM
Well, I got my copy from BlueMonk.  The newest version of Visual Studio is .Net, which is not 6.0.  So if you want to buy one, make sure it's the right one.  It seems that eBay has several copies of 6.0.

(Cheapest one)
http://cgi.ebay.com/MICROSOFT-VISUAL-BASIC-6-0-PROFESSIONAL-AE-EDITION_W0QQitemZ7243172890QQcategoryZ99330QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
Title: Re: Visual Basic 6 Professional
Post by: bluemonkmn on 2006-05-20, 07:52:26 AM
I actually paid about what you said for it (~$500 US) because I got it as part of Visual Studio 6, and I was serious enough about programming that I knew it would be worthwhile to me (and I had used it extensively at work too).  But if you happen to know any Microsoft employees, you might be able to work out a deal with them.  They frequently will buy software for friends at a great discount (on the order of 10% of the list price).  I eventually also ended up with an extra copy at work, which I was able to give away because we didn't need it there any more, so if you happen to know any computer programmers, I suppose there's also a small chance they might have an extra one around that you could use.

Another option is to get Visual Basic 6.0 Learning Edition, which is significantly cheaper than Visual Studio 6.0 Professional.  I believe even a program as complex as GameDev could compile and run with the Learning Edition.  If you're not specifically interested in working with GameDev 1.x source code, you might also consider the latest free version of Visual Studio available from Microsoft: Visual Studio 2005 Express http://msdn.microsoft.com/vstudio/express/ (http://msdn.microsoft.com/vstudio/express/)

Yay for free downloads :)
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-20, 11:14:20 AM
Quote
If you're not specifically interested in working with GameDev 1.x source code, you might also consider the latest free version of Visual Studio available from Microsoft: Visual Studio 2005 Express http://msdn.microsoft.com/vstudio/express/

Yay for free downloads

Yah, I've looked at that. I'm on dial-up and it's 60 MB, which takes approx. 6 hours. And, I've read some reviews on that version that say that it is pretty basic and simple so I'm not interested in that version.

I don't know any Microsoft employees, (well, atleast I don't think so). Anyways ,my birthday is coming up and VB6 is what I'm hopefully getting (I'm trying to lead my parents in the right direction  :) ).

In reply to Durnurd's post,
I know but it's also really expensive. I'm pretty sure the one I was using at Trent (where I was taking the course) was VB6, so that's the one I want.
Title: Re: Visual Basic 6 Professional
Post by: Dr Obvious on 2006-05-20, 06:28:28 PM
If you want to just write game dev scripts, you don't really need VB to do that.  If you think you want to get into programming, there's better things to learn than VB.  If you want to shell out money, try buying Microsoft C++, you'll save yourself about $800 dollars and that's just if you want to spend money on it.  If you want something completely free, download something like Textpad and just learn Java (though C++ is better for game development).  Not to knock Game Dev or people that actually use VB for things outside of prototyping, but VB isn't used for much outside of making prototypes.  If you want to make a quick good looking app, VB isn't too bad.  If you want to actually program something, learn C++ and it will take you much further.

Assuming your profile is right, you have a lot of time to learn.  You don't have to jump right in and buy the most expensive software right away.  Play around with the free stuff or at least the cheaper things before you go out and buy visual studio and learn on something a little better than VB.  If you think you're serious about getting into game development as a programmer, VB will get you absolutely nowhere, it's not even that great of a learning tool.
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-20, 07:21:42 PM
You don't have to buy Microsoft C++, of course.  You could just get a free C++ compiler if you were going to start doing something like that.  I myself have gotten into Java, which is great in my opinion.  Not for anything that's a critical system of course, but for normal things, it's wonderfully platform-independant.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-20, 07:51:31 PM
I am not just interested in VB for GameDev, but for making apps.

So far I only know scripts for web development (HTML, CSS, Javascript). So I would like to get into some programming scripts. I have looked at a few C++ tutorials before and it seems fairly complicated, it seems extremely different from what I'm familiar with. So I don't know, I'm interested in VB6 because it has a nice environment and (in my opinion) has everything, but then again there's probably tons more things out there it could have. I remember you (Durnurd) have made (or atleast started) some text-adventure engine. What did you use to write that? As far as Java goes, I've never evn downloaded it to run Java Applets on the internet before. So is C++ the main script for creating professional programs? What are programs like WordPad and PhotoShop written in. Once I figure some of this out I would like to make a webpage creator, for COMPLETE beginners.

Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-20, 08:01:30 PM
Most programs are written in the C++ Programming Language these days, and have been ever since it existed.  Before that, a lot of it was just C.  My Text Adventure engine was written in Java.  There are other programming languages out there that big programs are made with, but mostly that's just bitter old people not wanting to get with the program, no pun intended.

Also, things may be moving to C#, now that that is gaining momentum.  It's basically combines the power of C++ and the ease of use of Java (and removes the native cross-platform ability I think).  That might be something to look into instead of C++.
Title: Re: Visual Basic 6 Professional
Post by: Dr Obvious on 2006-05-20, 08:51:39 PM
Yup, C++ is the most widely used and can be free, I just prefer Visual Studio and that's what I would recocmend if you're absolutely set on spending money.  Java is good, but terrible for game development, even modile games.  It's a great language to learn, it's easy, and the API is great, but it's just too slow for game development.

Once again, don't start with VB, especially VB 6, as VB6 and VB .NET are actually a little bit different.  Any programming language looks difficult when you first look at it, especially when you're first starting out.  Just find a good book (any O'Reilly (http://www.amazon.com/gp/product/059600298X/sr=8-2/qid=1148179480/ref=pd_bbs_2/104-3239137-9131969?%5Fencoding=UTF8) book is great) and learn it.  As I said earlier, you're 12 so you have a lot of time to learn these things.  Don't expect to start C++ tomorrow and make a game next week, it's going to take a while to learn and get better at it.  Even using VB just for apps isn't the greatest idea. 

I'm not sure what you mean by apps, but VB just isn't what you want to use.  If it's just casualy apps, then you probably don't want to waste a grand on those.  If you actually want to learn how to program, VB will get you nowhere.  You'll learn about some if then statements, maybe some while, but you won't get much further than anything else just simple like that.  Note that I actually know more FORTRAN programmers than VB programmers.  I'm not saying VB is a bad thing to know, just don't use it to learn programming.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-20, 10:05:28 PM
Ok, I've been looking at C# tutorials for the last 2 hours. So many "hello world" tutorials....Anyways, I've been writing some of the code and learning what it does. I can't figure out how to compile it though;I'm gonna need a detailed explanation here... After I open up Command Prompt what do I do? Do I have to go open up the .net framework folder in another window, then type csc C:\file.cs in command prompt. That's pretty much what I'm getting out of all these tutorials but it doesn't work.

One more thing: Is C++ or C# harder to learn? Or are they both the same pretty much?
Title: Re: Visual Basic 6 Professional
Post by: Dr Obvious on 2006-05-20, 10:26:12 PM
Just go with C++.  C# is nice and all...but C++ will be better to learn.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-21, 07:17:49 AM
Ok, then what do you use to compile C++?
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-21, 07:26:53 AM
Just go with C++.  C# is nice and all...but C++ will be better to learn.

I have to disagree with that.  C# is just plain easier to program in when it comes right down to it.  For those not faint of heart, perhaps, C++ could be more powerful if you're trying to squeeze every last ounce of performance out, but one of my main gripes in C++ is pointers and dereferencing all gets very confusing, especially when overloading causes the * operator to have like seven different functions.  C# tries to make understanding pointers not so necessary, and in the end (I think) it's easier to program with.

Ok, then what do you use to compile C++?

To compile C++, if you're set on it, you can just download a C++ compiler such as Turbo C++ (First one that came to mind.  Try searching for Free C++ Compiler Download on Google to find a crapload more).  Do you have the latest version of Microsoft .NET 2.0 installed on your computer, BTW?  If not, that might be why your C# isn't compiling.  Also, the link BlueMonk gave earlier leads to a place where you can download the "light" Microsoft C# and C++ (and VB) Integrated Development Environment (IDE) and compiler for free.  I downloaded the VB one and it looks pretty good to me.  I don't know what's missing yet, but I haven't looked really hard (and GameDev 1.X doesn't upgrade to VB 2005).  I'd suggest trying one of those two (Microsoft C# or C++ .NET IDE).
Title: Programming languages
Post by: bluemonkmn on 2006-05-21, 08:15:09 AM
Oh, so much discussion, where to begin my response...

I think the VB is getting a bit of an unfair rap here.  It's not the best language, but I think it comes off sounding worse in this thread than it really is.  It is in fact used in a lot of mainstream major production software (where I work for instance).  Both VB6 and VB .NET are used for serious production applications.  It may not be the best for games (especially if you don't thoroughly understand what you're doing), but as GameDev 1.x proves, you can not only make games, but real-time scrolling game engines with reasonable performance in VB6 if you do it right.  Now in the sense that you really have to know what you're doing to get the best performance out of VB6, I would agree with Dr Obvious that you might want to learn a lower-level language than VB if you plan to be making serious games where you need the best performance.  But I'm not sure how important that is right now.  And I suspect you can eventually learn similar lessons using more enjoyable languages than C++. 

C++ has been the mainstream language for serious development organizations (yes, we use C++ where I work too, not just VB) for a long time.  But I'm really starting to believe that .NET provides us with a new generation/layer of languages that offers so much more power and ease of use (while limiting the loss of performance, understanding and control over the lower levels) that the trade-offs may finally balance in favor of these new languages over C++ for the majority of applications.  I won't jump into a detailed explanation of each aspect of these trade-offs just now, but suffice it to say that I have programmed extensively in VB3-6, VB.NET, C, C++ and C#, and based on my experience and training in .NET, I think .NET-based languages may be good not only for improved overall productivity, but improved learning curves as well.  Now that VB .NET and C# are truly object oriented languages, they can offer a much cleaner representation of real object oriented programming concepts, and without the pitfalls of C++ unmanaged pointers.

If you have the stomach for it, certainly go for C++, and you will probably be forced to understand how programming and compilers work at a pretty low (and useful) level.  But I don't think it's necessary any more to start at that level if you're not prepared for the complexity involved.  You can still learn the same performace-enhancing lessons using newer languages now that they don't hide quite so many details from you as VB6 did.

On to the next topic: Visual Basic 2005 Express... where are you reading that this environment is not good for serious development?  I must admit that I don't know much about the express editions.  But I can't imagine how they would have limited it so as to be un-useful even for applications like SGDK 2.  I suspect that SGDK2 would compile under the express editions of Visual Studio.  Perhaps now that durnurd is staying at my house for a summer internship we can both take a look.  Would you be interested in an Express edition if it turns out to be reasonably powerful after all?

And finally, it sounds like you are trying to program in C# without having Visual Studio.  Indeed that is painful.  Surely Visual C# 2005 Express or Visual Basic 2005 Express could make your life significantly easier there so you don't have to spend hours finding documentation  on every little command every time you want to do something new, and finding out how to compile all the different kinds of pieces without Visual Studio.  I wrote a batch file to compile SGDK2 without Visual Studio, and I can tell you it's not going to be much fun for a newcomer... not nearly as much fun as using the IDE to handle the gritty details :).

Maybe I sound bad for recommending skipping over some of the nitty gritty, thereby posing a risk that you'll never learn how things operate at a lower level.  But I think programming should be fun, and you should get to see some of the cool things you can do in these environments right away, and then go back and learn the details of the environment you're most interested in.  If you get bogged down in the details before you even get to anything interesting, another risk poses itself: the risk that you'll give up on a powerful and interesting language because it looks more complicated than it needs to be.  In that sense, you might even benefit from trying Visual C++ 2005 Express because I suspect the new environment for that will be pretty helpful too.

OK, this message is long enough :)
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-21, 10:20:22 AM
Ok, I have been looking at C++ and it does seem significantly harder than C#.

Quote
Do you have the latest version of Microsoft .NET 2.0 installed on your computer, BTW?  If not, that might be why your C# isn't compiling
No I don't think I do. Can I download it?
Maybe I'll go check out the express editions of Visual C# or whatever it's called.

Quote
On to the next topic: Visual Basic 2005 Express... where are you reading that this environment is not good for serious development?
I was looking to buy it on Amazon before I knew it was free. I saw some reviews there about it. If it did turn out to be powerful I would probably take another look.

Thanks for all the responses.
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-21, 11:24:58 AM
The express editions of Visual studio come with the latest version of .NET 2.0 but you have to download each piece seperately (C# is a seperate download than C++ is seperate from VB)
Title: Re: Visual Basic 6 Professional
Post by: bluemonkmn on 2006-05-21, 11:27:56 AM
Hm. I looked at a few Visual * 2005 Express product reviews on Amazon and didn't see any indication of the products not being powerful.  I must be looking at different products/reviews.  Anyway, durnurd and I did take a look at Visual C# 2005 Express on his computer, and it looks pretty powerful to me.  With a few changes to upgrade SGDK2 to DirectX 9.02, we were able to compile and run SGDK2 and even use the map editor from the code compiled under Visual C# 2005 Express.  I don't see any lack of power in C# Express.  Perhaps it just lacks some of the ASP .NET / Web Development components -- I don't know what else it could be missing because it all seems to be there -- even the wizards and toolboxes for generating and maintaining database connections.  Impressive what they're giving away for free these days.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-21, 04:53:32 PM
Cool, I would post a link to the review that said it had a lack of power but I can't find it. Anyways, doesn't it say that all the express downloads are 35-70MB? I would download it but it would take way too long to download on my computer. It seems to take an hour for every ten megs. Maybe some day when I get enough amibition and time I will download it. Is there any other way I can get the latest versioin of .NET 2.0?
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-21, 07:30:47 PM
Download it over night some time.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-21, 08:00:38 PM
That'd work, maybe I will.
Title: Re: Visual Basic 6 Professional
Post by: bluemonkmn on 2006-05-22, 05:22:19 AM
I would suggest that if you know anybody with a broadband internet connection and a CD writer, maybe you could ask them the favor of downloading it for you and writing it to CD (or whatever media is handy if it can hold ~70 MB).  But the problem with that is that the download just downloads a 2 MB bootstrap installer that downloads the rest during the installation.  So I guess that won't work; you'll have to start the install at home some evening, wait for the 2 MB download, then choose the install options, let it start downloading the rest, and go to bed.  Too bad they didn't provide an obvious complete download link for this.  But apparently if you install all the features and documentation the size of the download can be as large as 1.3 GB.  But at least that means that if you choose minimum options during install, your install might end up being significantly smaller than 70 MB.
Title: Re: Visual Basic 6 Professional
Post by: bluemonkmn on 2006-05-22, 05:29:29 AM
Ah, here it is, a page with files that a friend with a CD writer could download for you that include everything so you don't have to download more during the install:
http://msdn.microsoft.com/vstudio/express/support/install/ (http://msdn.microsoft.com/vstudio/express/support/install/)
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-22, 07:38:53 AM
Thanks, I'll get it sometime.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-22, 08:04:49 PM
Hey, I know this is extremely off-topic but hey, just check 'em out: http://www.geocities.com/sam_2d_online/animations.html (http://www.geocities.com/sam_2d_online/animations.html) I made them with Pivot.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-23, 08:53:20 PM
Anyways, off-topic again, sorry but I have to post this. Ok, I was at the website where I downloaded Pivot ( http://www.geocities.com/peter_bone_uk/software.html (http://www.geocities.com/peter_bone_uk/software.html) ) and there was a link to an MSN group thats all about this program. So I went there and joined and it turns out there is 14,663 members of the group! Who knew stick-figure animation was so popular? Anyways I'm getting a bit better at it, I'm working on an animation with a short little guy spinning around a poll coming out of a wall (like a chin-up pole) and a bunch of people come along that try to kill him (all these stick-men animations are violent, it makes them funny  ;D ) and he wastes all of them...I'm actually making it smooth and putting more time into the physics so it looks real. I think I'm kind of obsessed, it is pretty addictive. Even my "non-computer" sister actually opened up  and used the program while I wasn't there...that's a big step ahead for her  ;D hehe, I'm actually serious.
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-05-24, 10:19:38 AM
Being off topic, why didn't you just start a topic for what you were talking about?

Also: See this: http://www.newgrounds.com/collection/xiaoxiao.html
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-05-24, 02:43:25 PM
Holy those are amazing  :o . Anyways, I was gonna start another topic but I felt kind of like an idiot having 5 or 6 topics in a row all started by me. Maybe I still will because I will have tons more animations and stuff. Here's my latest and greatest : http://www.msnusers.com/Pivotanimation/msgattachments/28777 (http://www.msnusers.com/Pivotanimation/msgattachments/28777) It's not finished yet though...
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-09, 03:46:58 PM
Im downloading Visual Basic 2005 Express now. Its pretty much done. Now I can do some C# work too if i want, because atleast I have the new .NET framework.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-09, 06:35:35 PM
So...how did you guys learn VBScript?
Can anyone give me some links to good tutorials if you know any. ;D
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-09, 08:12:53 PM
My First VB Program. Form Creator, http://www.geocities.com/sam_2d_online/formcreator.zip (http://www.geocities.com/sam_2d_online/formcreator.zip). It's not the best and I think I'll add to it if I can learn to do some more things, but I'm proud of this...Yah, I know you VBS masters are laughing as you're reading this... :)
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-09, 09:25:48 PM
Here's an idea:  Create a WebBrowser object next to it, set its default url to "about:blank" then whenever the user clicks on one of the buttons, call two functions:
Code: [Select]
WebBrowser1.OpenNew false
WebBrowser1.Document.Write TextBox1.Text

Where TextBox1 is the name of the textbox already on the form and WebBrowser1 is the Web Browser object you just added.  This will allow you to automatically preview what the form will look like every time they add a new object.  Alternately, you could add these lines to the textbox1_change event so that it will update when they change it manually as well.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-10, 12:15:17 PM
I added a select all and copy button. I also added the web browser thing. Here it is: http://www.geocities.com/sam_2d_online/formcreator_v12.zip
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-11, 08:18:45 PM
Hey... :) Ummm... How do I make it so that every time the person clicks one of the buttons that adds code it starts a new line in the textbox (TextBox1)? The HTML just looks extremely messy.... ;D so if I could have it so that every time a new command is added (ie. new button, checkbox...ect.) is starts a new line so that the next command added will be on the next line.
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-11, 08:52:32 PM
Textbox1.text += "\n" + TheTextYouWantToAdd

or, if the text you want to add is a literal string, such as "Hello, World!"

Textbox1.text += "\nHello, World!"

\n denotes a new line character. or \r\n or \r.  Depending on what Opperating system you're using, they use different endline characters as standard, but \n is I think what everybody uses usually. \n means Linefeed, \r means Carriage Return (terms originally taken from a typewriter).
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-12, 08:58:05 AM
Ugh...I tried that...It didn't work. It just recognized the '\n' as text and instead of starting a new line it just put '\n' between each command. What am I doing wrong? Did I put the '\n' in the wrong place? I also tried a few other things like the '\r\n' and '\r' but they also didn't work.
Code: [Select]
Public Class Form1
    Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click

        TextBox1.Text += "\n<input type='radio' name=' ' value='RadioButton'>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub
    Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click

        TextBox1.Text += "\n<input type='checkbox' name=' ' value='CheckBox'>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub
    Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click

        TextBox1.Text += "\n<input type='text' name=' ' value=' ' maxlength=' ' size='25'>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click
        TextBox1.Text += "\n<textarea cols='15' rows='5'>text here</textarea>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click
        TextBox1.Text += "\n<input type='submit' value='Submit'>"
        TextBox1.SendToBack()
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click
        TextBox1.Text += "\n<input type='reset' value='Reset'>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click
        TextBox1.Text += "\n<br>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton8.Click
        TextBox1.Text += "\n</form>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub

    Private Sub ToolStripButton9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton9.Click
        TextBox1.SelectAll()
    End Sub

    Private Sub ToolStripButton10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton10.Click
        TextBox1.Copy()
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Document.Write(TextBox1.Text)
    End Sub
    Private Sub ToolStripButton11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton11.Click
        TextBox1.Clear()
        TextBox1.Text += "<form action=' ' method=' '>"
        WebBrowser1.Document.OpenNew(False)
        WebBrowser1.Refresh()
    End Sub
End Class
Title: VB .NET Multi-line Text
Post by: bluemonkmn on 2006-07-13, 05:19:30 AM
"\n" is for a newline in C#.  If you want a newline in VB.NET I generally use vbCrLf like this:

Text1.Text &= vbCrLf & "My next line of text"

Cr is for the carrige return and Lf is for the line feed.  The combination is what generally creates a new line in a windows application.  Also, in my example above, Text1's MultiLine property would have to be set to true to show the multi-line text.
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-13, 06:49:50 AM
whoops
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-13, 07:52:08 AM
yay it works now ;D lol durnurd, how many codes do you know?
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-13, 05:24:42 PM
Too many, apparently.

Basic, Visual Basic, VBScript, VB.NET, C++, C#, PHP, Java, Javascript, HTML, CSS, ASP.NET, and most recently, Whatever InstallShield uses which is a mix between Basic, C#, and perhaps some other language I don't know (i.e. Perl)
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-13, 07:11:44 PM
13..wow...but ofcourse I've seen someone that knew 14. She works at a university, Trent University. I never knew there were 3 VB codes...Is there much difference between them?
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-13, 09:37:38 PM
ugh...this is a little off-topic. So I have the .net framework 2.0 redistributable. I was trying to compile a hello world C# tutorial thing but it wouldn't work. Do i need to download the framework 2.0 SDK that is 354 megs?
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-14, 09:35:43 AM
Oh, I can come up with some more if you like ;-)  Let's see... TI-83+ Programming Language, for example.

What have you tried doing to compile the program, and what happens when it fails?
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-14, 11:24:46 AM
wow...never heard of that one...
I'll try doing the tutorial again now, so I can remember what happens other than it just not working :p
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-14, 11:32:43 AM
OK, I just redid the tutorial. First it told me to type this :
Code: [Select]
class hello
//This program does not do much
{
    static public void Main()
    {
       System.Console.WriteLine("Hello World");
    }
}
in my favorite text-editor blah blah blah... So I did. Then is just said to type csc I pressed enter:
(http://i65.photobucket.com/albums/h228/sam_46/commandpromptcsc.png)
Title: Re: Visual Basic 6 Professional
Post by: durnurd on 2006-07-14, 01:56:24 PM
Oh, the TI-83+ is a graphing calculator that a lot of people have for math classes from 8th grade on up through advanced calc in 2nd year of college (I still use mine).  And I just thought of another one: I know a little bit of XSL, kind of.

I think a very good idea would be for you to download the C# Express IDE and develop from there.  It makes things about 30 times easier.  Barring that:

For this to work, you need to either specify the path of csc.exe or go there.  The path should be at:

C:\windows\Microsoft.Net\Framework\v2.0.50727\

change your directory to there (i.e. type cd C:\windows\Microsoft.Net\Framework\v2.0.50727\) then try just running csc.  It should come up with the error "No Inputs Specified".  Which means that you need to tell it where myhello.cs is.  If myhello.cs is in C:\Documents And Settings\User\My Documents\Visual Studio 2005\Projects\MyHello\ then the entire command line would be:

csc "C:\Documents And Settings\User\My Documents\Visual Studio 2005\Projects\MyHello\myhello.cs"

This will build the executable in the current directory, which is probably not where you want it.  So you'll want to specify where to put the output, or run it from somewhere where you do want it to go.  In the first case:

csc "C:\Documents And Settings\User\My Documents\Visual Studio 2005\Projects\MyHello\myhello.cs" /out:"c:\Documents And Settings\User\Desktop\myhello.exe"

will output the file onto the desktop.  In the second case:

Change the directory to the desktop (i.e. type: cd "c:\Documents And Settings\User\Desktop")
now type:
\windows\Microsoft.Net\Framework\v2.0.50727\csc.exe "..\My Documents\Visual Studio 2005\Projects\MyHello\myhello.cs"
(This demonstrates relative paths.  \Windows goes to the root of the drive before specifying what to do, while ..\ goes to the parent directory, that is, User)

If, on the other hand, you want to add the .NET framework directory to your PATH variable, so you can run it from anywhere:
PATH C:\windows\Microsoft.Net\Framework\v2.0.50727\;%PATH%
will prepend that path to the PATH variable, so you can run any programs from that directory without having to either be in that directory or specify it directly.  That means that you can just type
csc myhello.cs
when you are in the directory with myhello.cs and it will automatically create the executable in the same directory.

Like I say, getting the IDE would be about 30 times easier.
Title: Re: Visual Basic 6 Professional
Post by: sam on 2006-07-14, 03:02:35 PM
lol ok. Ill probably get if its 30 times easier (oooh, ironic, its 30mb :D)