Basic helpful snippits
Most of these Snippits I have made, some of them I use alot, and others are really helpful. I would be updating this ever so often.
Split Text
With this code you have a textbox, that has more then 1 line, lets say
"Hello
There
Bob"
Then what this code will do is it will split each line from the enter, so that
parts(0) = Hello
parts(1) = There
parts(2) = Bob
So that if you want, you can now use something like
Textbox2.text = parts(1), so now Textbox2's text will be Textbox1's line 2.
Text Replacer
With this code put this in a button, and put 2 textboxes out. Whatever is in Textbox2 will be deleted from Textbox1. This is meant for replacement, but we are simply replacing with "", meaning nothing.
Open Programs
This code will Open Notepad, anything like this the start position is System32.
A more basic would look like
Open Website URL
Email Link
More to come, Im just tired atm :P.
Split Text
Code:
Dim fullText As String
Dim parts() As String
fullText = TextBox1.Text
parts = Split(fullText, Environment.NewLine)
"Hello
There
Bob"
Then what this code will do is it will split each line from the enter, so that
parts(0) = Hello
parts(1) = There
parts(2) = Bob
So that if you want, you can now use something like
Textbox2.text = parts(1), so now Textbox2's text will be Textbox1's line 2.
Text Replacer
Code:
Dim output As String = TextBox1.Text.Replace(TextBox2.Text, "")
TextBox1.Text = output
Open Programs
Code:
Shell("notepad.exe")
A more basic would look like
Code:
Shell("C:\Program Files\Internet Explorer\iexplore.exe")
Code:
System.Diagnostics.Process.Start("http://website.com")
Code:
System.Diagnostics.Process.Start("mailto:" & "Im@Ugleh.com")

