Kumpulan Syntax Sederhana VB

Membuka Website:
Code:
Process.Start("www.citdewa.blogspot.com")

Membuka Aplikasi Bawaan Windows:
Code:
Shell("Paint")

Untuk Menghapus Sebuah File :
Code:
Dim FileToDelete As String
FileToDelete = "C:\File.exe"
If System.IO.File.Exists(FileToDelete) = True Then
          End If
          System.IO.File.Delete(FileToDelete)

Mengehentikan Process Yang Sedang Berjalan :
Code:
Dim RunningProcess As System.Diagnostics.Process =
Process.GetProcessesByName("explorer.exe")(0)
RunningProcess.Kill()

Mengubah Nama Sebuah File :
Code:
My.Computer.FileSystem.RenameFile ("C:\Program Files\MozillaFirefox\firefox.exe", "Andre Keren.exe")

Menghapus Registry Key :
Code:
My.Computer.Registry.LocalMachine.DeleteSubKey("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SafeBoot")

Membuat Registry Key :
Code:
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
regKey.CreateSubKey("MyApp")
regKey.Close()

Fade in:
Code:
For FadeIn = 0.0 To 1.1 Step 0.1
Me.Opacity = FadeIn
Me.Refresh()
Threading.Thread.Sleep(100)
Next

Fade out:
Code:
For FadeOut = 90 To 10 Step -10
Me.Opacity = FadeOut / 100
Me.Refresh()
Threading.Thread.Sleep(50)
Next


Shutdown:
Code: Shell("Shutdown -s")

Restart:
Code: Shell("Shutdown -r")

LogOff:
Code: Shell("Shutdown -l")

My Site : root01localhost.net78.net

No comments :

Post a Comment