Page 1 of 1

how can i make the textbox update in realtime

Posted: Tue May 07, 2013 8:35 pm
by muttley1968
hello im building a custom minecraft launcher (still need minecraft account)

im building it kinda like magic launcher my aim is :P

anyway I have it launching fine but I have a
cmd box at the side I want to update in real time
here is a pic
Image



This is the code for the button that launches the game and works fine when you close the game it will update
with all the info from when the game started
Code: Select all
   entregame.Tag = "java -Xms256m -Xmx256m -cp ""%APPDATA%\.minecraft\bin\minecraft.jar;%APPDATA%\.minecraft\bin\jinput.jar;%APPDATA%\.minecraft\bin\lwjgl.jar;%APPDATA%\.minecraft\bin\lwjgl_util.jar"" -Djava.library.path=""%APPDATA%\.minecraft\bin\natives"" net.minecraft.client.Minecraft"
        BackTrackTextBox2.Text = ""
        Dim start_info As New ProcessStartInfo("cmd")
        start_info.UseShellExecute = False
        start_info.CreateNoWindow = True
        start_info.RedirectStandardOutput = True
        start_info.RedirectStandardError = True
        start_info.RedirectStandardInput = True
        Dim proc As New Process()
        proc.StartInfo = start_info
        proc.Start()
        Dim std_out As StreamReader = proc.StandardOutput
        Dim SW As System.IO.StreamWriter = proc.StandardInput
        Dim std_err As StreamReader = proc.StandardError()
        SW.WriteLine(entregame.Tag)
        SW.WriteLine("exit")
        BackTrackTextBox1.Text = std_out.ReadToEnd()
        BackTrackTextBox2.Text = std_err.ReadToEnd()
        std_err.Dispose()
        SW.Close()
        std_out.Close()
        std_err.Close()
        proc.Close()
here is a link to a .bat file that does exactly what I want :P
https://dl.dropboxusercontent.com/u/446 ... esting.bat

Re: how can i make the textbox update in realtime

Posted: Tue May 07, 2013 10:16 pm
by smashapps
You would use a timer and in the timers tick event run the code

Re: how can i make the textbox update in realtime

Posted: Tue May 07, 2013 10:34 pm
by muttley1968
that would make the program boot everytime though and it wont update it
it just freezes until you close minecraft then it reopens and starts again

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 1:47 am
by Shim
try Application.DoEvents() inside the loop

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 9:52 am
by muttley1968
not that didn't work either infact it didn't do anything bare make minecraft seem really laggy

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 10:21 am
by smashapps
Send me your TV ID and Pass if you want me to have a look in a message

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 2:17 pm
by muttley1968
yes that would be great ill skype you later but i have to go do some work in the garden for my mum now :(
so catch u in a few hours if that is okay

Thank you for your help

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 3:32 pm
by AnoPem
I Night have a snipptet that can do that but I will not be able to chech at the moment as I'm sitting in a traffic jam away from the airport

Re: how can i make the textbox update in realtime

Posted: Wed May 08, 2013 8:57 pm
by muttley1968
great im back now anyway so if anyone wants to help my Skype is rman180 and I really could do with getting it done by tonight