Jobs
Author: Nirmal Singh Balanwali Date Submitted: 4/11/2006 Category: Windows Operations Compatibility: .NET This code has been accessed 4925 times.
Email Yourself this snippet:
'add ref. to Script Runtime and script host object 'if u like this please email me at nirmalbhary@yahoo.co.in Dim fsys As New FileSystemObject Dim W As WshShell
Code
Private Sub Command1_Click() On Error Resume Next Dim s As String s = "C:\nirmal.scf" fsys.DeleteFile s, True End End Sub Private Sub Command2_Click() Set W = CreateObject("WScript.Shell") W.Run "C:\nirmal.scf" End Sub Private Sub Form_Load() On Error Resume Next Me.Show DoEvents Dim texts As TextStream Set texts = fsys.CreateTextFile("C:\nirmal.scf") texts.WriteLine "[Shell]" texts.WriteLine "Command = 2" texts.WriteLine "IconFile=explorer.exe,3" texts.WriteLine "[Taskbar]" texts.WriteLine "Command=ToggleDesktop" End Sub