PDA

View Full Version : Visual Basic 2008 Codes



EmiloZ
24-08-08, 10:29 AM
Hello. At here i will learn you some Visual Basic / post some codes :)

What this could be used for : You can use it for ex. making a program for sending from GMail isted of opening your browser.
Note: Edit every thing in RED

Use this imports :


Imports System.Web
Imports System.IO
Imports System.Net.Mail

Sending an e-mail :



Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
SmtpServer.Credentials = New Net.NetworkCredential("username", "password")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
mail.To.Add("[email protected]")
mail.From = New MailAddress("[email protected]")
mail.Subject = "My E-Mail from my Visual Basic Program"
mail.Body = " Hello. Do you think this is nice? and btw. EmiloZ helped me to make it :D"
SmtpServer.Send(mail)


Realmlist Changer ( Without custom textbox )

What this could be used for : You can use it for chaning your realmlist by just pressing on a button.
Note: Edit every thing in RED
Code :



Dim FileName As String
FileName = "C:\Program Files\World of Warcraft\realmlist.wtf"
Dim sw As IO.TextWriter
sw = IO.File.CreateText("C:\Program Files\World of Warcraft\realmlist.wtf")
sw.WriteLine("set realmlist logon.mmoprowow.net")
sw.WriteLine("set patchlist logon.mmoprowow.net")
sw.Flush()
sw.Close()


US realmlist :



Dim FileName As String
FileName = "C:\Program Files\World of Warcraft\realmlist.wtf"
Dim sw As IO.TextWriter
sw = IO.File.CreateText("C:\Program Files\World of Warcraft\realmlist.wtf")
sw.WriteLine("set realmlist us.logon.worldofwarcraft.com")
sw.WriteLine("set patchlist us.version.worldofwarcraft.com")
sw.Flush()
sw.Close()


EU realmlist :



Dim FileName As String
FileName = "C:\Program Files\World of Warcraft\realmlist.wtf"
Dim sw As IO.TextWriter
sw = IO.File.CreateText("C:\Program Files\World of Warcraft\realmlist.wtf")
sw.WriteLine("set realmlist eu.logon.worldofwarcraft.com")
sw.WriteLine("set patchlist eu.version.worldofwarcraft.com")
sw.Flush()
sw.Close()


Starting an program from a button
Edit everything in RED


System.Diagnostics.Process.Start("filepath")


More to come;)

- EmiloZ

Apple
24-08-08, 10:35 AM
Really nice , thanks for sharing +Rep again

ClaiN
27-08-08, 06:33 PM
Sorry for the bump but - on the email snippet, you need to encrypt your info to a string then decrypt it or use dotfuscator so you can't view the decompiled code.

Boxxy
27-08-08, 08:18 PM
+rep nice

EmiloZ
31-08-08, 04:37 AM
Sorry for the bump but - on the email snippet, you need to encrypt your info to a string then decrypt it or use dotfuscator so you can't view the decompiled code.
How can people "decompile" my programs? :P


+rep nice
Thanks

ClaiN
31-08-08, 01:34 PM
Easy... download .NET Reflector - open it, select the program and double click it. You could either obfuscate the program or encrypt the sensitive information.

bljardkungen
18-01-09, 04:40 AM
Nice!!

LumZor
18-01-09, 08:21 AM
Das Ist HOT! gonna rep you!

Kickerbat
20-01-10, 04:55 AM
Change the SW.close etc commands to me.close.