Reklam

Visual Basic.net Yararlı Kodlar








Merhaba Arkadaşlar Bugün Sizlere Kullandığım Ufak tefek yardımcı Kodları Paylaşacağım.





Başlayalım





Hizmetler:



Kod:



System.Diagnostics.Process.Start("services.msc")





Msconfig:

Kod:



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



Notepad:



Kod:



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



Firefox:



Kod:



 Try

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

        Finally

        End Try



Kayıt Defteri:



Kod:



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



İnternet Explorer:



Kod:



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



Paint:



Kod:



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



Hesap Makinesi:



Kod:



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



Görev Yöneticisi:



Kod:



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



Sistem Özellikleri:



Kod:



System.Diagnostics.Process.Start("sysdm.cpl")



Program Ekle/kaldır



Kod:



System.Diagnostics.Process.Start("appwiz.cpl")





*** Web sitesi açma ***

Kod:



Process.Start("www.ulas-saglam.blogspot.com")

Process.Start("www.ulas-saglam.blogspot.com")



*** Birşeyler açma örnek notepad ***

Kod:



Shell("Notepad")

Shell("Calculator")



File dan bir dosya silmek

Kod:



Dim FileToDelete As String

FileToDelete = "C:\File.exe"

If System.IO.File.Exists(FileToDelete) = True Then

System.IO.File.Delete(FileToDelete)



*** Bir dosyayı yeniden adlandırmak ***

Kod:



My.Computer.FileSystem.RenameFile ("C:\Program Files\Mozilla Firefox\firefox.exe", "Anything.exe")



*** Registery anahtarı silmek ***

Kod:



My.Computer.Registry.LocalMachine.DeleteSubKey("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SafeBoot")



*** registery Anahtarı yüklemek ***

Kod:



Dim regKey As RegistryKey

regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)

regKey.CreateSubKey("MyApp")

regKey.Close()



*** Metin konuşturmak için ***

Kod:



Dim sapi

sapi = CreateObject("sapi.spvoice")

sapi.Speak(Textbox1.text)



*** Gmail bombalama ***

*** Timer ekle,5 text boxs,1 button ***

textbox1=Gmail Kullanıcı adı örnek mesela (Ulaş Sağlam)

textbox2 = Gmail Şifre örnek meselaa ( onlinehile)

textbox3 = Kurban E-posta Adresi örnek ( asd@hotmail.com)

textbox4 = Konu örnek ( s.a)

textbox5 = Mesaj örnek ( mrb)

button1.text = Sayın iLLeqaLKinq gönderildi !

"Public Class Form1" Top Of ekleyin



*** Button 1 içine yazılcak code ***

Kod:



timer1.start



*** Timer içine yazılcak code ***

Kod:



Dim MyMailMessage As New MailMessage()

MyMailMessage.From = New MailAddress(TextBox1.Text)

MyMailMessage.To.Add(TextBox3.Text)

MyMailMessage.Subject = (TextBox4.Text)

MyMailMessage.Body = TextBox5.Text

Dim SMTPServer As New SmtpClient("smtp.gmail.com")

SMTPServer.Port = 587

SMTPServer.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox2.Text)

SMTPServer.EnableSsl = True

SMTPServer.Send(MyMailMessage)

MsgBox("Email başarı ile gönderilmiştir / Ulaş Sağlam ;)"





*** Müzik ekleme ***

Not : Müzik türü wawe olmalıdır.

*** Button1 eklencekler ***

Kod:



My.Computer.Audio.Play(My.Resources.song namenowav, AudioPlayMode.BackgroundLoop)



*** Button2 eklencekler ***

Kod:



My.Computer.Audio.Stop()



*** Klasor içinde dosyaların sayımı ***

Kod:



Dim NOF As Integer

Dim FilePath As String = TextBox1.Text

NOF = System.IO.Directory.GetFiles(FilePath).Length

TextBox2.Text =NOF.ToString



*** Case örneği ***

Eklencekler :

*** 1 Button ***

*** 1 Textbox ***

Kod:



extBox1.Text = Int(Rnd() * 4)

Select Case TextBox1.Text

Case 0

TextBox1.Text = "anything"

Case 1

TextBox1.Text = "passgenerator"

Case 2

TextBox1.Text = "CD key"

Case 3

TextBox1.Text = "strings"

End Select





*** Giriş örneği ***

1 button ekle

Kod:



If TextBox1.Text = "Ulaş Sağlam" _

And TextBox2.Text = "Ulaş Sağlam" Then

MsgBox("Welcome to Ulaş Sağlam")

Else

MsgBox("Ulaş Sağlam")

End If



*** Ekran görüntüsü yakalama ***

Büyük bir picturebox ekleyin

button1 = "Shoot"

Button2 = "Save"

bu şekilde olacak

ve Textbox1

Textbox2 ekleyiniz.



*** Button1 içine ***:

Kod:



Dim BumpBox As Rectangle

Dim screenshot As System.Drawing.Bitmap

Dim graph As Graphics

BumpBox = Screen.PrimaryScreen.BumpBox

screenshot = New System.Drawing.Bitmap(BumpBox.Width, BumpBox.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)

graph = Graphics.FromImage(screenshot)

graph.CopyFromScreen(BumpBox.X, BumpBox.Y, 0, 0, BumpBox.Size, CopyPixelOperation.SourceCopy)

PictureBox1.Image = screenshot



*** Button2 içine ***:

Kod:



Dim savefile As New System.IO.StreamWriter("C:\Users\" + TextBox1.Text + "\documents\" + TextBox2.Text + ".jpg")

savefile.Write(PictureBox1.Image)

savefile.Close()

MsgBox("Pictue Saved :D", MsgBoxStyle.Exclamation, "Oldu xD")





*** Cd-rom şakası yapımı ***

Kod:





Do

Dim oWMP = CreateObject("WMPlayer.OCX.7")

Dim colCDROMs = oWMP.cdromCollection

If colCDROMs.Count = 1 Then

For i = 0 To colCDROMs.Count - 1

colCDROMs.Item(i).Eject()

Next ' cdrom

End If

Loop



***Firewall Kapama*** :

Kod:



Dim Bumpbox As Process = New Process

Dim top As String = "netsh.exe"

Bumpbox.StartInfo.Arguments = ("firewall set opmode disable")

Bumpbox.StartInfo.FileName = top

Bumpbox.StartInfo.UseShellExecute = False

Bumpbox.StartInfo.RedirectStandardOutput = True

Bumpbox.StartInfo.CreateNoWindow = True

Bumpbox.Start()

Bumpbox.WaitForExit()



***Kapatma müdürü***:

Pc kapama :

Kod:



Shell("Shutdown -s")



Pc resetleme :

Kod:



Shell("Shutdown -r")



Log off :

Kod:



Shell("Shutdown -l")


Paylaşmadan Bırakmam

Benzer Yazılar

Visual Basic.net Yararlı Kodlar hakkında yorum yok.

Yorumlarınız Yönetici Tarafından Onaylandığı Zaman Yayınlanacaktır.

Ana Katagori

Full Programlar

Metin2 Hileleri

Kişisel

Tarih Kültür

Programlama