home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 June
/
Chip_2001-06_cd1.bin
/
zkuste
/
vbasic
/
Data
/
Zdroj
/
ctrlpnl.bas
< prev
next >
Wrap
BASIC Source File
|
2001-04-18
|
6KB
|
174 lines
Attribute VB_Name = "Module1"
'Using this Module
'Functions available:
'________________________________________________________
' Access, AddPrinter, Control, DateTime, Display, DUN, HardWare
' Floppy, Font, Modem, Network, Restart, ShortCut, Sound
' System, ShutDown, Uninstall, WindowsSetup
'________________________________________________________
Public Sub Access()
On Error GoTo Handler
Dim A As Long
A = Shell("rundll32.exe shell32.dll,Control_RunDLL access.cpl,,5")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub HardWare()
On Error GoTo Handler
Dim B As Long
B = Shell("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl @1")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub AddPrinter()
On Error GoTo Handler
Dim C As Long
C = Shell("rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Uninstall()
On Error GoTo Handler
Dim D As Long
D = Shell("rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,1")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub WindowsSetUp()
On Error GoTo Handler
Dim E As Long
E = Shell("rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub ShortCut()
On Error GoTo Handler
Dim F As Long
F = Shell("rundll32.exe apwiz.cpl,NewLinkHere %1")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub DateTime()
On Error GoTo Handler
Dim G As Long
G = Shell("rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub DUN()
On Error GoTo Handler
Dim H As Long
H = Shell("rundll32.exe rnaui.dll,RnaWizard")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Display()
On Error GoTo Handler
Dim I As Long
I = Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Font()
On Error GoTo Handler
Dim J As Long
J = Shell("rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder ")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub FormatFloppy()
On Error GoTo Handler
Dim K As Long
K = Shell("rundll32.exe shell32.dll,SHFormatDrive")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Modem()
On Error GoTo Handler
Dim L As Long
L = Shell("rundll32.exe shell32.dll,Control_RunDLL modem.cpl,,add")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Sound()
On Error GoTo Handler
Dim M As Long
M = Shell("rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,0")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub NetWork()
On Error GoTo Handler
Dim N As Long
N = Shell("rundll32.exe shell32.dll,Control_RunDLL netcpl.cpl")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub System()
On Error GoTo Handler
Dim O As Long
O = Shell("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,0")
Handler:
If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
rc = Shell("Control.exe", vbNormalFocus)
End If
End Sub
Public Sub Restart()
Dim P As Long
P = Shell("rundll32.exe user.exe,restartwindows")
End Sub
Public Sub ShutDown()
Dim Q As Long
Q = Shell("rundll32.exe user.exe,exitwindows")
End Sub
Public Sub Control()
rc = Shell("Control.exe", vbNormalFocus)
End Sub