First off, why would anybody here want to learn VB?
|
|
How to make a source code retriever
You can download visual studio 2011 Beta edition here (Free): Downloads | Microsoft Visual Studio
1. Press CTRL+N and name your project then press "ok"
2. Go to your toolbox and drag the following components onto your application: 3x label, 2x textbox, 2x button & 1x save file dialog.
And set them up like so:
3. Double click "Get source" and put the following code "Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox1.Text)
Dim response As System.Net.HttpWebResponse = request.GetResponse
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream( ))
Dim sourcecode As String = sr.ReadToEnd()
TextBox2.Text = sourcecode"
4. Double click "Save as HTML" and put the following code "SaveFileDialog1.ShowDialog()"
5. Double click "SaveFileDialog1" which is located at the bottom of visual basic. and put the following code "Dim filetosaveas As String = SaveFileDialog1.FileName
Dim objwriter As New System.IO.StreamWriter(filetosaveas)
objwriter.write(TextBox2.Text)"
You now have a fully working source retriever, you can also save it as HTML!



Visual basic is a dumbed down programming language (hence the word BASIC).
I don't understand this hate on VB.net, it's employing tens of thousands of people just like Java, C languages, PHP, Python, etc.. It's one of the most fun ways of making programs imo.
| « Fundamentals of Java | 3d Java Programming » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |