Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit 01e3640

Browse files
committed
Code Cleanup !
1 parent 6811f0d commit 01e3640

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

Minecraft Launch Script/Form1.vb

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,21 @@
44
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
55
rs.FindAllControls(Me)
66
mediaPlayer.Play()
7-
'Button1.Location = New Point(293, 248)
87
Button5.Enabled = False
98
Button2.Enabled = False
109
Shell("explorer.exe shell:appsFolder\Microsoft.MinecraftUWP_8wekyb3d8bbwe!App")
1110
Threading.Thread.Sleep(3000) 'This basically slows down our program, and the main windows gets time to load after 3 sec after the minecraft gets loaded, if this lines is removed the program does'nt works correctly.
1211
Dim myProcess() As Process = Process.GetProcessesByName("Minecraft.Windows")
1312
If myProcess.Length > 0 Then
1413
'Process is running
15-
'Button3.Visible = False
1614
Button3.Enabled = False
1715
Shell("taskkill /F /IM Minecraft.Windows.exe")
18-
'Label3.Font = New Font("Segoe UI", 20)
16+
Label3.Font = New Font("Segoe UI", 20)
1917
Label3.Visible = True
2018
Label3.Text = "Installed"
2119
Label3.ForeColor = Color.Lime
2220
Else
2321
'Process is not running
24-
'Button3.Visible = True
25-
'Button1.Visible = False
2622
Button5.Enabled = False
2723
Button2.Enabled = False
2824
Button1.Enabled = False
@@ -35,10 +31,6 @@
3531

3632
Private Sub Form1_Resize(sender As Object, e As EventArgs)
3733
rs.ResizeAllControls(Me)
38-
'Me.Refresh()
39-
'Button1.Location = New Point(293, 248)
40-
'Button5.Location = New Point(116, 248)
41-
'Button2.Location = New Point(464, 248)
4234
Label3.Font = New Font("Segoe UI", 20)
4335
Label2.Font = New Font("Segoe UI", 20)
4436
End Sub
@@ -59,18 +51,10 @@
5951
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
6052
mediaPlayer.Play()
6153
Process.Start("bin/start.bat")
62-
'Button5.Visible = True
6354
Button5.Enabled = True
64-
'Button2.Visible = True
6555
Button2.Enabled = True
66-
'Button3.Visible = False
6756
Button3.Enabled = False
68-
'Button1.Visible = False
6957
Button1.Enabled = False
70-
'Button4.Visible = False
71-
72-
'Button5.Location = New Point(116, 248)
73-
'Button2.Location = New Point(464, 248)
7458
Label2.Font = New Font("Segoe UI", 20)
7559
Label2.Visible = True
7660
Label2.Text = "Running"
@@ -85,13 +69,9 @@
8569
If result = DialogResult.Yes Then
8670
mediaPlayer.Play()
8771
Process.Start("bin/stop.bat")
88-
'Button5.Visible = False
8972
Button5.Enabled = False
90-
'Button2.Visible = False
9173
Button2.Enabled = False
92-
'Button1.Visible = True
9374
Button1.Enabled = True
94-
'Button1.Location = New Point(293, 248)
9575
Label2.Font = New Font("Segoe UI", 20)
9676
Label2.Visible = True
9777
Label2.Text = "Not Running"
@@ -102,15 +82,13 @@
10282
End Sub
10383

10484
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
105-
'Process.Start("https://www.youtube.com/channel/UCJaYH5KX_21lWfX2Ag3-ocg")
10685
mediaPlayer.Play()
10786
MessageBox.Show("Download only Minecraft Pocket Edition (Trial)", "Install Instruction", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
10887
Dim r As Long
10988
r = ShellExecute(0, "open", "https://www.microsoft.com/store/productId/9NBLGGH2JHXJ", 0, 0, 1)
11089
End Sub
11190

11291
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
113-
'Process.Start("notepad.exe", "What's New.txt")
11492
mediaPlayer.Play()
11593
Form2.Show()
11694
End Sub
@@ -172,16 +150,10 @@
172150
End Sub
173151

174152
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
175-
'Me.BackgroundImage.Dispose()
176-
'Me.BackgroundImage = Nothing
177-
'Me.BackgroundImage = System.Drawing.Image.FromFile("background/mcbackGndDay.jpg")
178153
Me.BackColor = DefaultBackColor
179154
End Sub
180155

181156
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
182-
'Me.BackgroundImage.Dispose()
183-
'Me.BackgroundImage = Nothing
184-
'Me.BackgroundImage = System.Drawing.Image.FromFile("background/mcbackGndNight.jpg")
185157
Me.BackColor = Color.Black
186158
End Sub
187159

0 commit comments

Comments
 (0)