123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- Imports System.Net
- Imports System.Xml
- Public Class Form1
- Dim appPath As String = Application.StartupPath()
- Private IsFormBeingDragged As Boolean = False
- Private MouseDownX As Integer
- Private MouseDownY As Integer
- Dim z As String
- Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
- For counter = 10 To 90 Step +20
- Me.Opacity = counter / 100
- Me.Refresh()
- Threading.Thread.Sleep(50)
- Next
- Me.Opacity = 100
- If My.Computer.FileSystem.DirectoryExists(appPath & "\system\minecraft") = False Then
- My.Computer.FileSystem.CreateDirectory(appPath & "\system\minecraft")
- End If
- If My.Computer.FileSystem.DirectoryExists(appPath & "\system\temp") = False Then
- My.Computer.FileSystem.CreateDirectory(appPath & "\system\temp")
- End If
- If My.Computer.FileSystem.FileExists(appPath & "\system\data\flaunch.ini") = False Then
- Dim file As System.IO.FileStream
- file = System.IO.File.Create(appPath & "\system\data\flaunch.ini")
- file.Dispose()
- MsgBox("歡迎使用此啟動器,這是你首次啟動,如需教學請參閱HKWTC 論壇的教學文章,多謝。")
- Else
- End If
- End Sub
- Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown
- If e.Button = MouseButtons.Left Then
- IsFormBeingDragged = True
- MouseDownX = e.X
- MouseDownY = e.Y
- End If
- End Sub
- Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseUp
- If e.Button = MouseButtons.Left Then
- IsFormBeingDragged = False
- End If
- End Sub
- Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseMove
- If IsFormBeingDragged Then
- Dim temp As Point = New Point()
- temp.X = Me.Location.X + (e.X - MouseDownX)
- temp.Y = Me.Location.Y + (e.Y - MouseDownY)
- Me.Location = temp
- temp = Nothing
- End If
- End Sub
- Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- End Sub
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- Dim iCount As Integer
- For iCount = 90 To 10 Step -10
- Me.Opacity = iCount / 100
- Threading.Thread.Sleep(50)
- Next
- Me.Close()
- End Sub
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- z = z + 1
- If z = 1 Then
- Me.BackgroundImage = My.Resources.BG3
- ElseIf z = 2 Then
- Me.BackgroundImage = My.Resources.BG2
- ElseIf z = 3 Then
- Me.BackgroundImage = My.Resources.BG1
- z = 0
- End If
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- Dim Form2 As New Form2
- Form2.Show()
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim Form3 As New Form3
- Form3.Show()
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Dim Form5 As New Form5
- Form5.Show()
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Form6.Show()
- End Sub
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- Form8.Show()
- End Sub
- End Class
|