<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8262567212766043429</id><updated>2011-03-26T18:01:06.523-07:00</updated><title type='text'>Programming Tutorials - Learn to Code/Hack</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://obzenlol.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8262567212766043429/posts/default'/><link rel='alternate' type='text/html' href='http://obzenlol.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>andÝ</name><uri>http://www.blogger.com/profile/07297546553335862470</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8262567212766043429.post-238943452736593995</id><published>2011-03-26T17:53:00.000-07:00</published><updated>2011-03-26T17:53:35.856-07:00</updated><title type='text'>1.0 Getting Started - Visual Basic - Creating your first form</title><content type='html'>Before we get started I would like to give some information on my  background. I am currently a computer science student; just finishing up  my second year. I code primarily in Java, PHP, HTML, Javascript, and  SQL. These Tutorials will be using Visual Basic and the .NET framework  because .NET is a native windows language and has no restrictions. Java  runs in a "sandbox" so to speak, so registry files and big changes to  the computer are very limited. That is why I will be doing mostly  tutorials for VB .NET and if this catches on, I could whip up some  Java/PHP/etc. tutorials, or even do some requests later on. &lt;br /&gt;&lt;br /&gt;Alright, so here we go--&lt;br /&gt;&lt;br /&gt;&lt;b&gt;STEP 1:&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://www.microsoft.com/express/Downloads/#2010-Visual-Basic"&gt;Getting VB Express 2010 &lt;/a&gt;&lt;/b&gt;&lt;br /&gt;Click on the first arrow, select the language and install.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;STEP 2: Creating a form with simple functionality&lt;/b&gt;&lt;br /&gt;Go ahead and open up VB Express. Select new project, and name is hello world&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-NK7yFjK9tzw/TY6Kafn3U6I/AAAAAAAAABo/mmOHd7goVSw/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="221" src="https://lh3.googleusercontent.com/-NK7yFjK9tzw/TY6Kafn3U6I/AAAAAAAAABo/mmOHd7goVSw/s320/1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You should see a window appear inside VB called "Form1" This is the GUI   of your program. Look to the left, here you will see your "Tool Box" It   is full of every little tool you could wish for. For the sake of user  friendliness, click to open the tool box, then right click and select  "dock" as shown:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-R52Br4EvEB8/TY6KezAwKZI/AAAAAAAAABs/C7EmYJN0KKg/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh6.googleusercontent.com/-R52Br4EvEB8/TY6KezAwKZI/AAAAAAAAABs/C7EmYJN0KKg/s1600/2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;This will be used a lot and it is good  to see all the functions we can add. You probably can guess what a lot  of these already do.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now to the bottom right  you will see the "Properties Page" This IMHO is  what makes VB so great,  you don't have to define every parameter with  code, You can simply  change the settings using a drop down list! Above  this you will see your  "Solution Explorer" At the moment it will just  show "My Project" and  "Form1.Vb"&lt;br /&gt;&lt;br /&gt;Now I want you to click once on the form, once it is selected go to the   properties menu and look through it until you find "Text|Form1" This is   the header of your form, change it to "My First Form!"&lt;br /&gt;&lt;br /&gt;Next you need to look in the properties for "Back Color|Control" Click   the drop down list and choose any colour you like (You can choose them   from the other tabs within the list too!)&lt;br /&gt;&lt;br /&gt;Once you have chosen a nice colour you are ready to create and run your   first program. Go File, Save All. It should save to a directory similar   to this.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;cite&gt;&lt;/cite&gt;&lt;i&gt;C:\Users\andy\Documents\Visual Studio 2010 Express\Projects\&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;Click save. Now go to Build, Build Hello World, look to the bottom left, it should say "Build Successful"&lt;br /&gt;&lt;br /&gt;You are almost done creating your first form, go to the directory you saved the project in, and then go:&lt;br /&gt;&lt;blockquote&gt;&lt;cite&gt;&lt;/cite&gt;&lt;i&gt;Visual Studio 2010 Express\Projects\Hello World\bin\Release&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;Now run the .exe in the "Release" folder.&lt;br /&gt;&lt;br /&gt;Well done, you have created and build your first form, easy huh.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;STEP 3: A little bit of Code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now it is time to make your form do something, I assume you still have VB open? If not go to:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;cite&gt;&lt;/cite&gt;&lt;i&gt;C:\Users\andy\Documents\Visual Studio 2010 Express\Projects\Hello World"&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;And open the ".vbproj" File.&lt;br /&gt;&lt;br /&gt;Now lets get started, double click your form, you should now see your first bit of code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeblock" style="background-color: #cccccc; text-align: left;"&gt;&lt;div class="title"&gt;&lt;u&gt;&lt;i&gt;Code:&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="body" dir="ltr"&gt;&lt;code&gt;Public Class Form1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Sub&lt;br /&gt;End Class&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;A little bit confusing? Don't worry, I will explain it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeblock" style="background-color: #cccccc;"&gt;&lt;div class="title"&gt;&lt;u&gt;&lt;i&gt;Code:&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="body" dir="ltr"&gt;&lt;code&gt;Public Class Form1&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;This will be at the top of all projects (Other than imports, but we will get to that later)&lt;br /&gt;&lt;div class="codeblock"&gt;&lt;div class="title" style="background-color: #cccccc;"&gt;&lt;u&gt;&lt;i&gt;Code:&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="body" dir="ltr" style="background-color: #cccccc;"&gt;&lt;code&gt;Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;This  is the "Sub" of your form (nasty functions can be placed in here making  a program attack your computer once it is executed), and&lt;br /&gt;&lt;div class="codeblock"&gt;&lt;div class="title" style="background-color: #cccccc;"&gt;&lt;u&gt;&lt;i&gt;Code:&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="body" dir="ltr" style="background-color: #cccccc;"&gt;&lt;code&gt;End Sub&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;This the end of that sub, in between those two bits of code we tell the program what to do when "Form1_Load" Form1 loads.&lt;br /&gt;&lt;br /&gt;Lastly.&lt;br /&gt;&lt;div class="codeblock" style="background-color: #cccccc;"&gt;&lt;div class="title"&gt;&lt;u&gt;&lt;i&gt;Code:&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="body" dir="ltr"&gt;&lt;code&gt;End Class&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;This shows we are done with coding and that it is the end of the program.&lt;br /&gt;&lt;br /&gt;Lets start adding some of our own stuff shall we? Click the space below Form1_Load and type (I advise you type, don't C&amp;amp;P)&lt;br /&gt;&lt;br /&gt;&lt;div class="codeblock" style="background-color: #cccccc;"&gt;&lt;div class="title"&gt;&lt;i&gt;&lt;u&gt;Code:&lt;/u&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="body" dir="ltr"&gt;&lt;code&gt;MessageBox.Show("Hello World")&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;What this does it first tell the program we want a message box   (MessageBox) Then tells it we want that box to be visible (.Show) Lastly   we tell it what we want in the box ( ("Hello World") )&lt;br /&gt;&lt;br /&gt;Now I want you to go File, Save All. Then Build, Build Hello World.&lt;br /&gt;&lt;br /&gt;At the top you should see there are two tabs, Form1.vb and Form1.vb(Design) Go back to the design one.&lt;br /&gt;&lt;br /&gt;Go back to the Release directory and run the .exe again, see what happens when "Form1_Load"s?&lt;br /&gt;&amp;nbsp;Boom! we now have a windows application that runs a little bit of code we made.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is all for the painfully noobie material. In the next tutorial we  will look at adding code like: if and else statements, Windows STMP  mailing (email anyone!), and textboxs and button functionality. (the  emailing comes in handy if you want to email yourself .txt logs from our  homemade keylogger &amp;gt;:D MOAR TO COME IN LESS THEN A WEEK... )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8262567212766043429-238943452736593995?l=obzenlol.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://obzenlol.blogspot.com/feeds/238943452736593995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://obzenlol.blogspot.com/2011/03/10-getting-started-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8262567212766043429/posts/default/238943452736593995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8262567212766043429/posts/default/238943452736593995'/><link rel='alternate' type='text/html' href='http://obzenlol.blogspot.com/2011/03/10-getting-started-visual-basic.html' title='1.0 Getting Started - Visual Basic - Creating your first form'/><author><name>andÝ</name><uri>http://www.blogger.com/profile/07297546553335862470</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02321161683911170811'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-NK7yFjK9tzw/TY6Kafn3U6I/AAAAAAAAABo/mmOHd7goVSw/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>