home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / Chip_2001-06_cd1.bin / zkuste / vbasic / Data / Zdroj / ctrlpnl.bas < prev    next >
BASIC Source File  |  2001-04-18  |  6KB  |  174 lines

  1. Attribute VB_Name = "Module1"
  2. 'Using this Module
  3. 'Functions available:
  4. '________________________________________________________
  5. '    Access, AddPrinter, Control, DateTime,  Display, DUN, HardWare
  6. '    Floppy, Font, Modem, Network, Restart, ShortCut, Sound
  7. '    System, ShutDown, Uninstall,  WindowsSetup
  8. '________________________________________________________
  9.  
  10. Public Sub Access()
  11.   On Error GoTo Handler
  12.   Dim A As Long
  13.   A = Shell("rundll32.exe shell32.dll,Control_RunDLL access.cpl,,5")
  14. Handler:
  15.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  16.     rc = Shell("Control.exe", vbNormalFocus)
  17.   End If
  18. End Sub
  19.  
  20. Public Sub HardWare()
  21.   On Error GoTo Handler
  22.   Dim B As Long
  23.   B = Shell("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl @1")
  24. Handler:
  25.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  26.     rc = Shell("Control.exe", vbNormalFocus)
  27.   End If
  28. End Sub
  29.  
  30. Public Sub AddPrinter()
  31.   On Error GoTo Handler
  32.   Dim C As Long
  33.   C = Shell("rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")
  34. Handler:
  35.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  36.     rc = Shell("Control.exe", vbNormalFocus)
  37.   End If
  38. End Sub
  39.  
  40. Public Sub Uninstall()
  41.   On Error GoTo Handler
  42.   Dim D As Long
  43.   D = Shell("rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,1")
  44. Handler:
  45.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  46.     rc = Shell("Control.exe", vbNormalFocus)
  47.   End If
  48. End Sub
  49.  
  50. Public Sub WindowsSetUp()
  51.   On Error GoTo Handler
  52.   Dim E As Long
  53.   E = Shell("rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2")
  54. Handler:
  55.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  56.     rc = Shell("Control.exe", vbNormalFocus)
  57.   End If
  58. End Sub
  59.  
  60. Public Sub ShortCut()
  61.   On Error GoTo Handler
  62.   Dim F As Long
  63.   F = Shell("rundll32.exe apwiz.cpl,NewLinkHere %1")
  64. Handler:
  65.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  66.     rc = Shell("Control.exe", vbNormalFocus)
  67.   End If
  68. End Sub
  69.  
  70. Public Sub DateTime()
  71.   On Error GoTo Handler
  72.   Dim G As Long
  73.   G = Shell("rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0")
  74. Handler:
  75.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  76.     rc = Shell("Control.exe", vbNormalFocus)
  77.   End If
  78. End Sub
  79.  
  80. Public Sub DUN()
  81.   On Error GoTo Handler
  82.   Dim H As Long
  83.   H = Shell("rundll32.exe rnaui.dll,RnaWizard")
  84. Handler:
  85.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  86.     rc = Shell("Control.exe", vbNormalFocus)
  87.   End If
  88. End Sub
  89.  
  90. Public Sub Display()
  91.   On Error GoTo Handler
  92.   Dim I As Long
  93.   I = Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0")
  94. Handler:
  95.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  96.     rc = Shell("Control.exe", vbNormalFocus)
  97.   End If
  98. End Sub
  99.  
  100. Public Sub Font()
  101.   On Error GoTo Handler
  102.   Dim J As Long
  103.   J = Shell("rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder ")
  104. Handler:
  105.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  106.     rc = Shell("Control.exe", vbNormalFocus)
  107.   End If
  108. End Sub
  109.  
  110. Public Sub FormatFloppy()
  111.   On Error GoTo Handler
  112.   Dim K As Long
  113.   K = Shell("rundll32.exe shell32.dll,SHFormatDrive")
  114. Handler:
  115.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  116.     rc = Shell("Control.exe", vbNormalFocus)
  117.   End If
  118. End Sub
  119.  
  120. Public Sub Modem()
  121.   On Error GoTo Handler
  122.   Dim L As Long
  123.   L = Shell("rundll32.exe shell32.dll,Control_RunDLL modem.cpl,,add")
  124. Handler:
  125.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  126.     rc = Shell("Control.exe", vbNormalFocus)
  127.   End If
  128. End Sub
  129.  
  130. Public Sub Sound()
  131.   On Error GoTo Handler
  132.   Dim M As Long
  133.   M = Shell("rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,0")
  134. Handler:
  135.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  136.     rc = Shell("Control.exe", vbNormalFocus)
  137.   End If
  138. End Sub
  139.  
  140. Public Sub NetWork()
  141.   On Error GoTo Handler
  142.   Dim N As Long
  143.   N = Shell("rundll32.exe shell32.dll,Control_RunDLL netcpl.cpl")
  144. Handler:
  145.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  146.     rc = Shell("Control.exe", vbNormalFocus)
  147.   End If
  148. End Sub
  149.  
  150. Public Sub System()
  151.   On Error GoTo Handler
  152.   Dim O As Long
  153.   O = Shell("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,0")
  154. Handler:
  155.   If MsgBox("This option was not found on your system. Click Yes to open Control Pannel", vbExclamation + vbYesNo, "Error !") = vbYes Then
  156.     rc = Shell("Control.exe", vbNormalFocus)
  157.   End If
  158. End Sub
  159.  
  160. Public Sub Restart()
  161.   Dim P As Long
  162.   P = Shell("rundll32.exe user.exe,restartwindows")
  163. End Sub
  164.  
  165. Public Sub ShutDown()
  166.   Dim Q As Long
  167.   Q = Shell("rundll32.exe user.exe,exitwindows")
  168. End Sub
  169.  
  170. Public Sub Control()
  171.   rc = Shell("Control.exe", vbNormalFocus)
  172. End Sub
  173.  
  174.