-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathfrmMain.vb
More file actions
28 lines (23 loc) · 791 Bytes
/
Copy pathfrmMain.vb
File metadata and controls
28 lines (23 loc) · 791 Bytes
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
Imports System.IO
Public Class frmMain
Dim SERVER_IP As String = "127.0.0.1"
Dim IP_FILE As String = "connect.ini"
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'make form invisible
Me.Visible = False
'get ip from file, if it exists
If File.Exists(IP_FILE) Then
Using fileReader As StreamReader = New StreamReader(IP_FILE)
SERVER_IP = fileReader.ReadLine
End Using
End If
'execute l2.bin
Try
Shell("l2.bin IP=" + SERVER_IP, vbNormalFocus)
Catch ex As Exception
MsgBox("L2.bin not found! Try checking your files.", MsgBoxStyle.Critical, "L2")
End Try
'close L2
End
End Sub
End Class