Login Register






[VB.NET] Some Snippets filter_list
Author
Message
[VB.NET] Some Snippets #1

Empty Recycle Bin

Code:
Public Class Form1 Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hWnd As Int32, ByVal pszRootPath As String, ByVal dwFlags As Int32) As Int32 Private Declare Function SHUpdateRecycleBinIcon Lib "shell32.dll" () As Int32 Private Const SHERB_NOCONFIRMATION = &H1 Private Const SHERB_NOPROGRESSUI = &H2 Private Const SHERB_NOSOUND = &H4 #Region "Empty Recycle Bin (SUB)" Private Sub EmptyRecycleBin() SHEmptyRecycleBin(Me.Handle.ToInt32, vbNullString, SHERB_NOCONFIRMATION + SHERB_NOSOUND) SHUpdateRecycleBinIcon() End Sub #End Region Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click EmptyRecycleBin() End Sub End Class


Downloader

Code:
My.Computer.Network.DownloadFile(textbox1.text)

Shutdown

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

Advanced:
Code:
System.Diagnostics.Process.Start("shutdown", "-s -t 05 -c mess with me and get hacked like the rest")
(If u want it to restart thn change "-s" to "-r" or if u want it to log off change it to "-l")

Disable Showing Hidden Files
Code:
'****Credits Goes To James****** Sub Hide() Dim regloc as String = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" My.Computer.Registry.SetValue(regloc, "Hidden", "0", Microsoft.Win32.RegistryValueKind.DWord) End Sub

Reply

RE: [VB.NET] Some Snippets #2
I just missed your snippets so much Smile Thanks man!!! Ur awesome!!!!
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [VB.NET] Some Snippets #3
awesome snippets :thumbs:
Pierce the life fibers with your drill.

Reply

RE: [VB.NET] Some Snippets #4
(02-12-2011, 12:18 AM)1llusion Wrote: I just missed your snippets so much Smile Thanks man!!! Ur awesome!!!!
They misses u 2! lol
No Problem man

(02-12-2011, 11:40 AM)1234hotmaster Wrote: awesome snippets :thumbs:
Thank u dude!


Reply