VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Adds and Removes an expandable Control Panel to the Start Menu.

by Richard Dean (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 2nd October 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Adds and Removes an expandable Control Panel to the Start Menu.

Rate Adds and Removes an expandable Control Panel to the Start Menu.



''*                                           *
''* Add two buttons named Command1 and        *
''* Command2 to a form. Copy and paste code.  *
''*                                           *
'

Private Sub Command1_Click()
''Remove Control Panel from the Start Menu
RmDir "C:\Windows\Start Menu\Control
Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
''Enable the proper button
Command1.Enabled = 0
Command2.Enabled = 1
End Sub

Private Sub Command2_Click()
''Add Control Panel to the Start Menu
MkDir "C:\Windows\Start Menu\Control
Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
''Enable the propper button
Command1.Enabled = 1
Command2.Enabled = 0
End Sub

Private Sub Form_Load()
''Check to see if Directory Exist
Dim MyDir As String
MyDir = Dir("C:\Windows\Start Menu\Control
Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}", vbDirectory)
''If the Dir does not exist then enable the proper button
If MyDir = "" Then
Command2.Enabled = True
Command1.Enabled = 0
''If the Dir exist then enable the proper button
Else
Command1.Enabled = True
Command2.Enabled = 0
End If
End Sub


Download this snippet    Add to My Saved Code

Adds and Removes an expandable Control Panel to the Start Menu. Comments

No comments have been posted about Adds and Removes an expandable Control Panel to the Start Menu.. Why not be the first to post a comment about Adds and Removes an expandable Control Panel to the Start Menu..

Post your comment

Subject:
Message:
0/1000 characters