|
4 | 4 | Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
5 | 5 | rs.FindAllControls(Me)
|
6 | 6 | mediaPlayer.Play()
|
7 |
| - 'Button1.Location = New Point(293, 248) |
8 | 7 | Button5.Enabled = False
|
9 | 8 | Button2.Enabled = False
|
10 | 9 | Shell("explorer.exe shell:appsFolder\Microsoft.MinecraftUWP_8wekyb3d8bbwe!App")
|
11 | 10 | 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.
|
12 | 11 | Dim myProcess() As Process = Process.GetProcessesByName("Minecraft.Windows")
|
13 | 12 | If myProcess.Length > 0 Then
|
14 | 13 | 'Process is running
|
15 |
| - 'Button3.Visible = False |
16 | 14 | Button3.Enabled = False
|
17 | 15 | Shell("taskkill /F /IM Minecraft.Windows.exe")
|
18 |
| - 'Label3.Font = New Font("Segoe UI", 20) |
| 16 | + Label3.Font = New Font("Segoe UI", 20) |
19 | 17 | Label3.Visible = True
|
20 | 18 | Label3.Text = "Installed"
|
21 | 19 | Label3.ForeColor = Color.Lime
|
22 | 20 | Else
|
23 | 21 | 'Process is not running
|
24 |
| - 'Button3.Visible = True |
25 |
| - 'Button1.Visible = False |
26 | 22 | Button5.Enabled = False
|
27 | 23 | Button2.Enabled = False
|
28 | 24 | Button1.Enabled = False
|
|
35 | 31 |
|
36 | 32 | Private Sub Form1_Resize(sender As Object, e As EventArgs)
|
37 | 33 | 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) |
42 | 34 | Label3.Font = New Font("Segoe UI", 20)
|
43 | 35 | Label2.Font = New Font("Segoe UI", 20)
|
44 | 36 | End Sub
|
|
59 | 51 | Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
60 | 52 | mediaPlayer.Play()
|
61 | 53 | Process.Start("bin/start.bat")
|
62 |
| - 'Button5.Visible = True |
63 | 54 | Button5.Enabled = True
|
64 |
| - 'Button2.Visible = True |
65 | 55 | Button2.Enabled = True
|
66 |
| - 'Button3.Visible = False |
67 | 56 | Button3.Enabled = False
|
68 |
| - 'Button1.Visible = False |
69 | 57 | Button1.Enabled = False
|
70 |
| - 'Button4.Visible = False |
71 |
| - |
72 |
| - 'Button5.Location = New Point(116, 248) |
73 |
| - 'Button2.Location = New Point(464, 248) |
74 | 58 | Label2.Font = New Font("Segoe UI", 20)
|
75 | 59 | Label2.Visible = True
|
76 | 60 | Label2.Text = "Running"
|
|
85 | 69 | If result = DialogResult.Yes Then
|
86 | 70 | mediaPlayer.Play()
|
87 | 71 | Process.Start("bin/stop.bat")
|
88 |
| - 'Button5.Visible = False |
89 | 72 | Button5.Enabled = False
|
90 |
| - 'Button2.Visible = False |
91 | 73 | Button2.Enabled = False
|
92 |
| - 'Button1.Visible = True |
93 | 74 | Button1.Enabled = True
|
94 |
| - 'Button1.Location = New Point(293, 248) |
95 | 75 | Label2.Font = New Font("Segoe UI", 20)
|
96 | 76 | Label2.Visible = True
|
97 | 77 | Label2.Text = "Not Running"
|
|
102 | 82 | End Sub
|
103 | 83 |
|
104 | 84 | Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
105 |
| - 'Process.Start("https://www.youtube.com/channel/UCJaYH5KX_21lWfX2Ag3-ocg") |
106 | 85 | mediaPlayer.Play()
|
107 | 86 | MessageBox.Show("Download only Minecraft Pocket Edition (Trial)", "Install Instruction", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
108 | 87 | Dim r As Long
|
109 | 88 | r = ShellExecute(0, "open", "https://www.microsoft.com/store/productId/9NBLGGH2JHXJ", 0, 0, 1)
|
110 | 89 | End Sub
|
111 | 90 |
|
112 | 91 | Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
113 |
| - 'Process.Start("notepad.exe", "What's New.txt") |
114 | 92 | mediaPlayer.Play()
|
115 | 93 | Form2.Show()
|
116 | 94 | End Sub
|
|
172 | 150 | End Sub
|
173 | 151 |
|
174 | 152 | 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") |
178 | 153 | Me.BackColor = DefaultBackColor
|
179 | 154 | End Sub
|
180 | 155 |
|
181 | 156 | 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") |
185 | 157 | Me.BackColor = Color.Black
|
186 | 158 | End Sub
|
187 | 159 |
|
|
0 commit comments