-
Notifications
You must be signed in to change notification settings - Fork 1
/
Form1.vb
137 lines (125 loc) · 7.68 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Public Class Form1
Public Sub ShowDesktop()
keybd_event(VK_LWIN, 0, 0, 0)
keybd_event(77, 0, 0, 0)
keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_LWIN = &H5B
Private Sub Settings_Click(sender As Object, e As EventArgs) Handles Settings.Click
If Panel1.Visible = True Then
Panel1.Visible = False
Settings.Text = "Settings"
Button1.Text = TextBox1.Text
Button2.Text = TextBox4.Text
Button3.Text = TextBox6.Text
Button4.Text = TextBox8.Text
Button5.Text = TextBox10.Text
Button6.Text = TextBox12.Text
Button7.Text = TextBox14.Text
Button8.Text = TextBox16.Text
My.Computer.Registry.LocalMachine.SetValue("Button1Text", TextBox1.Text)
My.Computer.Registry.LocalMachine.SetValue("Button2Text", TextBox4.Text)
My.Computer.Registry.LocalMachine.SetValue("Button3Text", TextBox6.Text)
My.Computer.Registry.LocalMachine.SetValue("Button4Text", TextBox8.Text)
My.Computer.Registry.LocalMachine.SetValue("Button5Text", TextBox10.Text)
My.Computer.Registry.LocalMachine.SetValue("Button6Text", TextBox12.Text)
My.Computer.Registry.LocalMachine.SetValue("Button7Text", TextBox14.Text)
My.Computer.Registry.LocalMachine.SetValue("Button8Text", TextBox16.Text)
My.Computer.Registry.LocalMachine.SetValue("Button1Exe", TextBox2.Text)
My.Computer.Registry.LocalMachine.SetValue("Button2Exe", TextBox3.Text)
My.Computer.Registry.LocalMachine.SetValue("Button3Exe", TextBox5.Text)
My.Computer.Registry.LocalMachine.SetValue("Button4Exe", TextBox7.Text)
My.Computer.Registry.LocalMachine.SetValue("Button5Exe", TextBox9.Text)
My.Computer.Registry.LocalMachine.SetValue("Button6Exe", TextBox11.Text)
My.Computer.Registry.LocalMachine.SetValue("Button7Exe", TextBox13.Text)
My.Computer.Registry.LocalMachine.SetValue("Button8Exe", TextBox15.Text)
Else
TextBox1.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Text")
TextBox4.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Text")
TextBox6.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Text")
TextBox8.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Text")
TextBox10.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Text")
TextBox12.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Text")
TextBox14.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Text")
TextBox16.Text = My.Computer.Registry.LocalMachine.GetValue("Button8Text")
TextBox2.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Exe")
TextBox3.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Exe")
TextBox5.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Exe")
TextBox7.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Exe")
TextBox9.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Exe")
TextBox11.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Exe")
TextBox13.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Exe")
TextBox15.Text = My.Computer.Registry.LocalMachine.GetValue("Button8Exe")
Panel1.Visible = True
Settings.Text = "Save"
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Process.Start(TextBox2.Text)
End Sub
Private Sub ToDesktop_Click(sender As Object, e As EventArgs) Handles ToDesktop.Click
Call ShowDesktop()
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
Process.Start("explorer.exe", "C:\")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Process.Start(TextBox3.Text)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Process.Start(TextBox5.Text)
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Process.Start(TextBox7.Text)
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Process.Start(TextBox9.Text)
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Process.Start(TextBox11.Text)
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Process.Start(TextBox13.Text)
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Process.Start(TextBox15.Text)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Button1.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Text")
Button2.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Text")
Button3.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Text")
Button4.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Text")
Button5.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Text")
Button6.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Text")
Button7.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Text")
Button8.Text = My.Computer.Registry.LocalMachine.GetValue("Button8Text")
TextBox2.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Exe")
TextBox3.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Exe")
TextBox5.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Exe")
TextBox7.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Exe")
TextBox9.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Exe")
TextBox11.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Exe")
TextBox13.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Exe")
TextBox15.Text = My.Computer.Registry.LocalMachine.GetValue("ButtonE8xe")
End Sub
Sub Main()
Button1.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Text")
Button2.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Text")
Button3.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Text")
Button4.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Text")
Button5.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Text")
Button6.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Text")
Button7.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Text")
Button8.Text = My.Computer.Registry.LocalMachine.GetValue("Button8Text")
TextBox2.Text = My.Computer.Registry.LocalMachine.GetValue("Button1Exe")
TextBox3.Text = My.Computer.Registry.LocalMachine.GetValue("Button2Exe")
TextBox5.Text = My.Computer.Registry.LocalMachine.GetValue("Button3Exe")
TextBox7.Text = My.Computer.Registry.LocalMachine.GetValue("Button4Exe")
TextBox9.Text = My.Computer.Registry.LocalMachine.GetValue("Button5Exe")
TextBox11.Text = My.Computer.Registry.LocalMachine.GetValue("Button6Exe")
TextBox13.Text = My.Computer.Registry.LocalMachine.GetValue("Button7Exe")
TextBox15.Text = My.Computer.Registry.LocalMachine.GetValue("ButtonE8xe")
End Sub
End Class