Ronald Estacion
Member
hello, i made a .exe launcher, i was able to launch a program named minecraft using the process.start. But this certain program generates error ussually, so what i tried to do was get the window title of the minecraft and categorize if its an error or the actual game.
This is what i did
Interval to 100 Enabled True
then
Interval to 1000 Activated by a button.
Then
Interval 100 Enabled true
So this transfers the window title of the launched program to a textbox then the "if statement" compares it and if its the error, it kills the error and relaunch the program.
This is already a working program but i want to make the launching faster, the problem is if i
hasten the interval of timer 2, it sometimes kill the non, error program that successfully launched.
If anyone can help me, Hide the error or remove it please do help me. Im not yet an expert on vb.net but i want to learn from the best.
This is what i did
Private Sub Timer3_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim p As Process
For Each p In Process.GetProcessesByName("javaw")
TextBox2.Text = (p.MainWindowTitle.ToString)
Next
End Sub
Interval to 100 Enabled True
then
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If TextBox2.Text = "" Or TextBox2.Text = "Java Virtual Machine Launcher" Then
Timer4.Start()
Else
Timer4.Stop()
Timer2.Stop()
End If
End Sub
Interval to 1000 Activated by a button.
Then
Private Sub Timer3_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim p As Process
For Each p In Process.GetProcessesByName("javaw")
TextBox2.Text = (p.MainWindowTitle.ToString)
Next
End Sub
Interval 100 Enabled true
So this transfers the window title of the launched program to a textbox then the "if statement" compares it and if its the error, it kills the error and relaunch the program.
This is already a working program but i want to make the launching faster, the problem is if i
hasten the interval of timer 2, it sometimes kill the non, error program that successfully launched.
If anyone can help me, Hide the error or remove it please do help me. Im not yet an expert on vb.net but i want to learn from the best.