Post: *Guide/Basics Of Visual Basic Coding* {In Progress}
02-11-2011, 10:59 AM #1
Pauly
Banned
(adsbygoogle = window.adsbygoogle || []).push({}); Ok So In This Thread I Will Be Giving You All The Basic And Advanced Codes/Functions For Visual Basic This Is Like Drackos Thread Except Mine Is For Visual Basic And His Is For C++
This Is For The People Who Are New To Programing Or Just Prefer Visual Basic As They're Primary Coding Language, Because Visual Basic Is The Easiest Coding Language.

See Page 2 For Basic Functions
[multipage=Basic Functions]
Ok Now I Will Be Showing You Some Basic Functions
I Have To Go Out I Will Put In More Codes When I Get Back!

If You Want Another Form To Pop Up When You Click A Button Or Label Or A Tab Just Double Click On You're Button Or Whatever You're Using And Put In This Code And That's It
    
Form2.Show()


Now Say You Want Your Form To Close When You Click A Button Or Whatever You're Using Just Double Click The Button And Put In This Code
    
Me.Hide()


Now If You Want To Have A Message Box Pop Up When A Button Is Clicked Just Double Click The Button And Put In This Code
    
MsgBox = ("YOUR TEXT HERE!")


[multipage=Advanced Functions]
I Have To Go Out So I Will Put The Codes In When I Get Back!

[multipage=Helpful Tutorials]
I Have To Go Out I Will Put The Videos In When I Get Back!
(adsbygoogle = window.adsbygoogle || []).push({});
02-13-2011, 12:50 AM #11
Pauly
Banned
Originally posted by RUFFINGUY View Post
thanks alot, and EM has his to where it refers to a database.dat for the codes.

Please pm it when you get done.

here You must login or register to view this content.
02-13-2011, 12:55 AM #12
CHAOZ
Banned
Originally posted by Mr.Chrome
here You must login or register to view this content.


thanks alot
02-13-2011, 12:56 AM #13
Pauly
Banned
Originally posted by RUFFINGUY View Post
thanks alot

np did u look at it?
02-13-2011, 12:58 AM #14
CHAOZ
Banned
Originally posted by Mr.Chrome
np did u look at it?


i am soon. not on computer
02-13-2011, 01:13 AM #15
Pauly
Banned
Originally posted by RUFFINGUY View Post
i am soon. not on computer

ohh alright well let me know when u look at it
02-13-2011, 08:57 PM #16
Cody_h4x
Nobody is like me
This shoulda helped all the noobsOutie
02-15-2011, 04:11 AM #17
Rath
Today Will Be Different
Originally posted by RUFFINGUY View Post
thanks alot, and EM has his to where it refers to a database.dat for the codes.

Please pm it when you get done.


I was about to say if your talking about making it show code in another window in a text box.. just have two forms...

then here is an eg.

           Form2.Show()
Form2.RichTextBox1.Text = TextBox1.Text


Which will open the text in another form... in a RichTextBox.
Basically copy paste some scripts into a textbox and just do

    RichTextBox1.Text = TextBox1.Text


But thats if you using VB. Hope that helped.
02-15-2011, 08:42 PM #18
[VG]Mars
Save Point
Originally posted by Fascism View Post
I was about to say if your talking about making it show code in another window in a text box.. just have two forms...
Which will open the text in another form... in a RichTextBox.


It's really not necessary to have a separate form at all since it can become hard to keep track of multiple forms especially where a large number of items are involved.Although depending on the complexity of the program and how many objects are going to be on the form my solution may not be the best, especially with older machines. However, this is how I would go about it, with two examples of layout, having never used 'EliteMossy's Multi-Tool' but from the short clip of it I saw on Youtube it looks like he just uses a massive amount of labels.

    Public Class Form1
'First Define all the code items, I'm using two for each method.
Dim example1ComboBox As String
Dim example2ComboBox As String
Dim example3tab As String
Dim example4tab As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' This is where we make the code appear within the text box/define what the above variables will be, your code.
example1ComboBox = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 1"
example2ComboBox = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 2"
example3tab = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 3"
example4tab = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 4"
'Using & vbNewLine & between "Text" you can add as many lines of code as you require.
Me.Text = "[VG]Mars is Awesome, He made this because it's not nessecary to use a seperate form for code samples"

'Hiding all the controls that we will use to select and view the code until we need them
ComboBox1.Hide()
RichTextBox1.Hide()
RichTextBox2.Hide()
RichTextBox3.Hide()
TabControl1.Hide()
End Sub


Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
'This is where we make the code appear within the text box if it is selecte from our list.
If ComboBox1.SelectedItem = ComboBox1.Items(0) Then
RichTextBox1.Text = example1ComboBox
ElseIf ComboBox1.SelectedItem = ComboBox1.Items(1) Then
RichTextBox1.Text = example2ComboBox
End If
'It is possible to add as many ElseIf statements as there are pieces of code, but be aware that the first item in your list is 0 not 1 as you would expect.
End Sub


Private Sub TabControl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.Click
'This shows the code within the text boxes when a tab is selected, again it is possible to add as many elseif's as there are pieces of code.
'In this case the tab being selected will start with 1 instead of 0 as with the ComboBox control.
If TabControl1.SelectedTab Is TabPage1 Then
RichTextBox3.Text = example3tab
ElseIf TabControl1.SelectedTab Is TabPage2 Then
RichTextBox2.Text = example4tab
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ComboBox1.Show()
RichTextBox1.Show()
RichTextBox2.Show()
RichTextBox3.Show()
TabControl1.Show()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ComboBox1.Hide()
RichTextBox1.Hide()
RichTextBox2.Hide()
RichTextBox3.Hide()
TabControl1.Hide()
End Sub
End Class

You must login or register to view this content.
You must login or register to view this content.

Not trying to shit on your or anything, just offering another way of doing things.
02-15-2011, 10:15 PM #19
Rath
Today Will Be Different
[quote='[VG]Mars;2575591']It's really not necessary to have a separate form at all since it can become hard to keep track of multiple forms especially where a large number of items are involved.Although depending on the complexity of the program and how many objects are going to be on the form my solution may not be the best, especially with older machines. However, this is how I would go about it, with two examples of layout, having never used 'EliteMossy's Multi-Tool' but from the short clip of it I saw on Youtube it looks like he just uses a massive amount of labels.

    Public Class Form1
'First Define all the code items, I'm using two for each method.
Dim example1ComboBox As String
Dim example2ComboBox As String
Dim example3tab As String
Dim example4tab As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' This is where we make the code appear within the text box/define what the above variables will be, your code.
example1ComboBox = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 1"
example2ComboBox = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 2"
example3tab = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 3"
example4tab = "Put line one of code here" & vbNewLine & "Put Line two Here" & vbNewLine & "This is Example 4"
'Using & vbNewLine & between "Text" you can add as many lines of code as you require.
Me.Text = "[VG]Mars is Awesome, He made this because it's not nessecary to use a seperate form for code samples"

'Hiding all the controls that we will use to select and view the code until we need them
ComboBox1.Hide()
RichTextBox1.Hide()
RichTextBox2.Hide()
RichTextBox3.Hide()
TabControl1.Hide()
End Sub


Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
'This is where we make the code appear within the text box if it is selecte from our list.
If ComboBox1.SelectedItem = ComboBox1.Items(0) Then
RichTextBox1.Text = example1ComboBox
ElseIf ComboBox1.SelectedItem = ComboBox1.Items(1) Then
RichTextBox1.Text = example2ComboBox
End If
'It is possible to add as many ElseIf statements as there are pieces of code, but be aware that the first item in your list is 0 not 1 as you would expect.
End Sub


Private Sub TabControl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.Click
'This shows the code within the text boxes when a tab is selected, again it is possible to add as many elseif's as there are pieces of code.
'In this case the tab being selected will start with 1 instead of 0 as with the ComboBox control.
If TabControl1.SelectedTab Is TabPage1 Then
RichTextBox3.Text = example3tab
ElseIf TabControl1.SelectedTab Is TabPage2 Then
RichTextBox2.Text = example4tab
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ComboBox1.Show()
RichTextBox1.Show()
RichTextBox2.Show()
RichTextBox3.Show()
TabControl1.Show()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ComboBox1.Hide()
RichTextBox1.Hide()
RichTextBox2.Hide()
RichTextBox3.Hide()
TabControl1.Hide()
End Sub
End Class

You must login or register to view this content.
You must login or register to view this content.

Not trying to shit on your or anything, just offering another way of doing things.[/quote]

I know lol, I was explaining it to Ruffin, you can have it open in another window like Mossy does. I've coded C# and Visual C# etc

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo