The font is so hard to see
Visual basic Annoying message boxes! I'm too lazy to upload source code or screenshots, sorry...
This tutorial will teach you how to make a program that executes an infinite sum of "messageboxes"
Firstly open a new Visual Basic "Form project". Name it "Msg"
Drag and drop the "Timer" object from the "Components" section.
Now double click on the form its self to open up the source for the "Form1" object.
In the source enter the following text:
Timer1.Start()
Me.Hide()
Dim i As Integer
The source should now look like this:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
Me.Hide()
Dim i As Integer
End Sub
Now go back to the "Form1"(design) screen and double click on "timer1":
And enter the following code:
Me.Hide()
For i = 1 To 10
MessageBox.show("Prank")
i = 1
Next
The "timer1" source code should look like this:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Hide()
For i = 1 To 10
MessageBox.show("Prank")
i = 1
Next
End Sub
End Class
Now press the green Debug button or press "F5":
You will see lots of text boxes appear,to stop this press the "stop" debugging button...
The program is now complete!
To make a new full exe you have to "Build it",
to do this click on the "Build" text on the tool bar and click "Build Msg".
You can run the program in the following folder:
C:\Documents and Settings\James\My Documents\Visual Studio 2008\Projects\Msg\Msg\bin\Release
Now for some theory
" Timer1.Start()
Me.Hide()
Dim i As Integer"
"Timer1.Start ()" = This function loads up when the form loads and starts the Timer, incrementing every ms
"Me.hide()" = This function Makes the form appear invisible, thus as user wont see it."Me" refers to to object that
the source apply to, in this case the form.
"Dim i as integer" = This holds an integer value to 32 bytes to store positive and negative numbers, how ever Decimal point numbers are not supported by this "Data type", a "Long" value enables decimal points other wise known as "Floating point" numbers. "DIM" Stands for "Dimension", and is sued to declare the variable, a good way to remember it is to think "DoInMemory"
"i" is the name of the variable you want to store it as, and "As Integer" is used to tell the program what data type it is.
"
For i = 1 To 10
MessageBox.show("Prank")
i = 1
Next"
"For i = 1 to 10" = This is called a loop or an iteration, this basicly assignes the variable "i" the value of 1, and the text that follows is executed 10 times in this case :
MsgBox("Prank")
i = 1
Is executed 10 times, the first loop makes the variable "i" = 1, second loop makes the variable i = 2 until "i" = 10
"Next", just tells the program to increment i by 1.
"Messagebox.show ()" = a function that makes a messagebox, messagebox.show ("Prank") makes a messagebox show the text "Prank".
Last edited by FpsTibble; 10-23-2009 at 04:47 PM.
PEACE IS AN ILLUSION...PAIN IS REALITY....
-EXPERIENCED CODER
-EXPERIENCED GAMER
-EXPERIENCED FUCKER
VB TUTS:
The font is so hard to see
iknow.
change the font?
PEACE IS AN ILLUSION...PAIN IS REALITY....
-EXPERIENCED CODER
-EXPERIENCED GAMER
-EXPERIENCED FUCKER
VB TUTS:
[YOUTUBE]youtube.com/watch?v=dySNK-m2vTo[/YOUTUBE]
Last edited by FpsTibble; 10-23-2009 at 04:51 PM.
PEACE IS AN ILLUSION...PAIN IS REALITY....
-EXPERIENCED CODER
-EXPERIENCED GAMER
-EXPERIENCED FUCKER
VB TUTS:
Double post ftw, watch out!
-Rest in peace leechers-
Your PM box is 100% full.