You are viewing our Forum Archives. To view or take place in current topics click here.
VB-Mega-Thread-Simple Programming Tuts
Posted:
VB-Mega-Thread-Simple Programming TutsPosted:
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
So I was erasing files from my hard drive to save some memory and I came across a file named "Easy Tutorials for kids" I was a click away from deleting it until I remembered that I made these for a site that used to be up called vortech. There were a lot of people who were starting out in Visual Basic so I started posting tutorials. Instead of posting one tutorial a week like I was doing Im just going to make this a Big oh'l thread. First starting with the list of tutorials I was going to do and the ones with the stars next to them are the ones I had time to do. Unfortunately I didn't get far with this because the site is no longer worked on. So here it is.
Hello, This tutorial will be a special 2-part tutorial it will include 2 topics both listed here
Ight, so the first i'll be talking about "changing objects colors". What I mean by object is anything you drag and drop onto your forum or the forum itself. Now
when changing an objects color your going to use 3 commands, depending on what your trying to do, If you are trying to change the background you use .backcolor
but if your trying to change the font color your going to use .forecolor.,. Now there is one more command I refer to it as the default command when you want to make something
return to visual basic/studios default color, to do this you use the .UseVisualStyleBackColor (Reminder this is a boolean) so it should look like this
Button3.UseVisualStyleBackColor = true
Button3.UseVisualStyleBackColor = false
Example Section
PART TWO
Ight, so the second thing i'll be talking about "Hide&Show". Now you use these to make objects disappear and reappear. This is extremely handy because it doesnt make
you use the .visible = true/false. Now since this takes longer to write it is just more practical to use the .hide .show options.
Now to do this you simply do this. Button1.hide Button1.show. Now for some examples.
END
[align=center]This is the end of this post Thanks for reading if you have got this far
Last edited by Majesticfalcon ; edited 1 time in total
Please also note I Wrote these along time ago : D
First Entry: List of Tutorials
First entry. This part will be the list of tutorials that I might do.
Well these are the ones that I will hit first, Please note I will not do these in order.
Well That is it thanks for reading and keep reading
- 1.Rnd Function *
2.Rnd Pic Gen *
3.Move Objects *
4.Change Object's Colors *
5.If..Then..Elseif
6.Select Case
7.CheckListBox
8.ComboBoxes
9.MenuList
10.Msgbox
11.Hide & Show Functions *
12.IsNumeric()
13.IsDate()
14.IsArray()
15.Enable Controls(Checkboxes, Buttons, Etc)
16.Val()
17.Handeling Nan And Infinity Values
18.And, Or, Not, Xor
19.Converting Variable Types(Mega Thread)
20.Converting Standard Numeric Format Strings(Mega Thread) *
21.Public Constants
22.Arrays
23.MultiDiminsional Arrays
24.IsNot Nothing
25.Math.Sqrt
26.ForeColor/BackColor *
27.Types Of Data Types (Mega Thread)
28.Inputboxes
Well these are the ones that I will hit first, Please note I will not do these in order.
Well That is it thanks for reading and keep reading
Second Entry: Moving Objects
Dim APW as String = "After Period Word"
Hello, This tutorial will be about moving objects. In this tutorial you will see.,.
Lets start off by introducing how to move objects. Everything that is placed on the gui is placed according to how far from the top of the page and how far from the left of the page
Now the APW should be simple and self explanatory. If it is not then the APW is .Top .Left
Please remember that these are separate so it will be written like this.
Ok, so since this is not a hard topic I will not spend a great deal of time detailing, so without further complications.
When to use this: When you have to move things on the click of a button(EXAMPLE ONLY)
Way's i've used it:
This wraps up my tutorial for moving objects. Thanks and keep reading
Genius = Majestic Falcon + Werdwed
Serials.Guro:D
Need a Serial? Hit me up
Hello, This tutorial will be about moving objects. In this tutorial you will see.,.
- 1. What to put after the period
2. When to use this command
3. Some practical examples
4. Ways i've used it
Lets start off by introducing how to move objects. Everything that is placed on the gui is placed according to how far from the top of the page and how far from the left of the page
Now the APW should be simple and self explanatory. If it is not then the APW is .Top .Left
Please remember that these are separate so it will be written like this.
- richtextbox1.top = 150
richtextbox1.left = 150
Ok, so since this is not a hard topic I will not spend a great deal of time detailing, so without further complications.
When to use this: When you have to move things on the click of a button(EXAMPLE ONLY)
checkbox1.top = 50
checkbox1.left = 50
checkbox2.left = 25
checkbox2.top = 25
checkbox3.top = 12
checkbox3.left = 12
checkbox4.left = 6
checkbox4.top = 6
checkbox5.top = 3
checkbox5.left = 3
Way's i've used it:
Public Class Form1
Private Sub Button1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
If Button1.Top >= 363 Then
Button1.Top = 0
ElseIf Button1.Top <= 0 Then
Button1.Top = 363
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("YAY You are good at life")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Top = 0
End Sub
End Class
This wraps up my tutorial for moving objects. Thanks and keep reading
Genius = Majestic Falcon + Werdwed
Serials.Guro:D
Need a Serial? Hit me up
Third Entry:Standard Numeric Format Strings
Dim SNFS as String = "Standard Numeric Format String"
Hello, This tutorial will be about standard numeric format strings. You will learn how to
Now What SNFS does is it changes the way integers are displayed. For instance ("Number: " & Format(a, "C")) will display everything that the
variable a is storeing assuming that it is a integer variable and not an object variable. Now the how to use SNFS.
The general form of SNFS is & Format(IntVarName, "Type") this must be in quotes.
You can use this when makeing
Now for examples.
Alright, well that sums up this tutorial for now thanks and read again
Hello, This tutorial will be about standard numeric format strings. You will learn how to
- 1.)How to use SNFS
2.)When to use SNFS
3.)Personal examples of SNFS
Now What SNFS does is it changes the way integers are displayed. For instance ("Number: " & Format(a, "C")) will display everything that the
variable a is storeing assuming that it is a integer variable and not an object variable. Now the how to use SNFS.
The general form of SNFS is & Format(IntVarName, "Type") this must be in quotes.
You can use this when makeing
Budget calculator
Gross income calculator
Percentage finder
Scientific calculator
To change what your converting into change the type to one of these
C = Currency
D = Decimal
E = Exponential
N = Number
P = Percent
X = Hexadecimal
Now for examples.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pay As Double
Dim pay1 As Integer
Dim rnd As New Random
If CheckBox1.Checked Then
pay = 2
TextBox1.Text = ("Number: " & Format(pay, "C"))
ElseIf CheckBox2.Checked Then
pay = 232
TextBox1.Text = ("Number: " & Format(pay, "E"))
ElseIf CheckBox3.Checked Then
pay = 2
TextBox1.Text = ("Number: " & Format(pay, "N"))
ElseIf CheckBox4.Checked Then
pay = 232
TextBox1.Text = ("Number: " & Format(pay, "N"))
ElseIf CheckBox5.Checked Then
pay = 2
TextBox1.Text = ("Number: " & Format(pay, "P"))
Else
pay1 = rnd.Next(1, 9999)
textbox2.Text = pay1
TextBox1.Text = ("Number: " & Format(pay1, "X"))
End If
End Sub
Alright, well that sums up this tutorial for now thanks and read again
Fourth Entry: 2-Part Special- Changing objects colors & Hide & Show Functions
Things you should know
I made the buttons name "B" so when referring to a button it will be B#
Hello, This tutorial will be a special 2-part tutorial it will include 2 topics both listed here
1.)Changing objects colors
2.)Hide & show functions
Ight, so the first i'll be talking about "changing objects colors". What I mean by object is anything you drag and drop onto your forum or the forum itself. Now
when changing an objects color your going to use 3 commands, depending on what your trying to do, If you are trying to change the background you use .backcolor
but if your trying to change the font color your going to use .forecolor.,. Now there is one more command I refer to it as the default command when you want to make something
return to visual basic/studios default color, to do this you use the .UseVisualStyleBackColor (Reminder this is a boolean) so it should look like this
Button3.UseVisualStyleBackColor = true
Button3.UseVisualStyleBackColor = false
Example Section
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
B.BackColor = Color.Red
B2.ForeColor = Color.Red
B3.UseVisualStyleBackColor = True
End Sub
End Class
PART TWO
Ight, so the second thing i'll be talking about "Hide&Show". Now you use these to make objects disappear and reappear. This is extremely handy because it doesnt make
you use the .visible = true/false. Now since this takes longer to write it is just more practical to use the .hide .show options.
Now to do this you simply do this. Button1.hide Button1.show. Now for some examples.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B.Click
B.BackColor = Color.Red
B2.ForeColor = Color.Red
B3.UseVisualStyleBackColor = True
B4.visible = True
B5.Visible = False
B6.Hide()
B7.show()
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5.Click
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
B7.show()
End Sub
End Class
END
Good Bye
[align=center]This is the end of this post Thanks for reading if you have got this far
Last edited by Majesticfalcon ; edited 1 time in total
#2. Posted:
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
these aren't simple, they are beginner knowledge.
- 0useful
- 1not useful
You are viewing our Forum Archives. To view or take place in current topics click here.