There are many similar problems on the internet but none have solved this exact problem.
I use a process and delegate to call a c program and redirect output to a textbox.
I want the textbox to update line by line, in real time. BUT it seems to wait until a large chunk of text is in the...
Ah yes this makes sense now, together with the fact that I was originally seeing the address.
Now that I use it properly I do see that the tooltip has both the pointer address AND a plus sign to expand and show the value!
Thanks again xwb. The "murky cloud" is lifting again. :)
Thanks xwb, my training never included those methods of parentheses around a pointer as you show. So I was incrementing the address and not the value.
I just tried ++(*iptr); and (*iptr)++ to increment the value and they do work!
I had begun to wonder if the difference is that I am...
I'm using vs2008 programming in C code.
First my question then a discovery that I hope will help the rusty c programmers out there.
In debugging C code with VS2008, the tool tip over the variable (or in a watch window) is in hex! I tried selecting the right-click hex display option to on and...
OK - thanks. Definitely nothing was cut and pasted, so this is very curious and it's happened twice now.
I won't worry too much right now but it does make you wonder if it's an obscure bug.
In solution Explorer double click your "formxxx.vb" to open it.
OR if you have the "Show All Files" option toggled on then just select your formxxx.vb and click "View code".
Now in the editor (left hand pane), is it blank/empty? or is it missing the class declaration?
E.G. :
Public Class formxxx...
If you open the code window and right click in the code is there an option to view designer?
In your solution explorer click the Show All Files option - second icon from the left,usually.
AT your form there should be a plus symbol; click that and it should show all files connected with the form...
Ah I see what you mean - right clicking on a form in the Solution explorer normally gives the option 'View Designer' and there is also a button at the top of the Solution explorer that says 'View Designer' when you hover the mouse over it. So your button and right click option for 'View...
Hi jebenson - No, I had not touched the grid. However, I am surprised at your revelation that moving a control causes the event 'Handles' clause to be removed! Seems a bad idea and maybe that is the culprit...
I was trying a compile option for a simpler version of the program and while testing...
It happened again! I think there must be a bug in VS 2008.
I have almost finished the program and all was working fine this morning. Suddenly I noticed things were not updating as I clicked different rows of my grid. Those things are done from certain events of the grid and those events are NOT...
Almost a month and all still works well- The rest of the save procedures and error trapping are all done and I only have to solve an issue with a called-process output-redirection not updating a textbox live.
Thanks again for all the help.
I would class this one resolved- How do I do this?
No response for a while now- I apologise if I have upset anybody somehow. I just would like to make my called process output live to my VB.net textbox. So far it seems this is not possible at all in vb.net, even though some have said they got t to work.
All suggestions will be welcome.
Sorry- my post had one error:
Using pProcess.WaitForExit() it actually now hangs on this WaitForExit(). (it used to hang on the invoke statement- not sure why it's different now)
...while even with pProcess.WaitForExit(5) it allows the sub to complete and the events fire to print the output.
Summary after more trials- If I simply have:
pProcess.Start()
pProcess.BeginOutputReadLine()
pProcess.WaitForExit()
... it hangs on the the invoke statement in the sub "UpdateTextBox"
If I use a loop like this:
pProcess.Start()
pProcess.BeginOutputReadLine()
Do Until...
Ok that last null-reference problem that just started was because I removed the vbNewline in the text append statement (because it was printing the last few lines out with multiple line spacing). It clearly kills the whole thing if you don't include a newline, so I put it back in and the code...
Now I tried changing the process waitForExit to using a while loop like this:
Try
Dim pblnStarted As Boolean = pProcess.Start()
pProcess.BeginOutputReadLine()
'pProcess.BeginErrorReadLine()
Do Until pProcess.HasExited...
Today I tried a breakpoint in the margin at the line:
If txtOutput.InvokeRequired
Private Sub UpdateTextBox(ByVal text As String)
If txtOutput.InvokeRequired Then
Dim d As New SetTextCallback(AddressOf UpdateTextBox)
Me.Invoke(d, New Object() {text}) ' STUCK...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.