473,382 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Problem with me.invoke MethodeInvoker

Hello

I'm new to VB.Net and try to create a console applicatione which will
redirect the output to an arraylist.

I found a very good sample at:
http://dotnet.mvps.org/dotnet/sample...ectConsole.zip

Basically it works. But the problem is I'm unsure about the invoke. The
results will only be added (AddTextToArray) if the application is
finished with all procedures. This seems to be the synchronus call from
the invoke. I need to make multiple calls to the console and need the
results from the first call. How wil I know when the program is finished
and how can I triger the other calls to the console.

Private Sub StreamOutput()
Dim Line As String = m_Process.StandardOutput.ReadLine()
Try
Do While Line.Length >= 0
If Line.Length 0 Then
AddText(ConvertFromOem(Line))
End If
Line = m_Process.StandardOutput.ReadLine()
Loop
Catch
Debug.Print(String.Format("""{0}"" wurde beendet!",
m_Process.StartInfo.FileName))
End Try
End Sub
Private Sub AddText(ByVal Text As String)
m_TextToAdd = Text
Me.Invoke(CType(AddressOf Me.AddTextToArray, MethodInvoker))
End Sub
Private Sub AddTextToArray()
If ConsoleInitialized Then
ConsoleResults.Add(m_TextToAdd)
End If
End Sub
Please be aware I'm very new to VB.Net.....
appreciating any help

Regards

Manfred
Dec 3 '06 #1
0 1980

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bisquic | last post by:
Ok, I've read a handful of articles out there concerning the issue of accessing a control from a thread other than the one from which it was created. I think the most well-rounded solution I found...
14
by: Christian Kaiser | last post by:
We have a component that has no window. Well, no window in managed code - it uses a DLL which itself uses a window, and this is our problem! When the garbage collector runs and removes our...
8
by: jesmi | last post by:
my code is: addRecord.cfm <cfinclude template="head.cfm"> <p> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td> <div align="center">
7
by: Jeroen | last post by:
We converted our decently large (13 projects, compiled about 12 mb) VStudio 2003/.Net1.1 project to VStudio 2005/.Net2. My two colleagues have no problem starting the new solution, but I get an...
3
by: mayur1 | last post by:
Hello everybody, I am trying to connect to DB2 V 8.1 on Red Hat Linux V5 from WebSphere Application Server V6 on Windows Server 2003. The problem that i am facing is that its not able to opent...
1
by: rohitkec | last post by:
I am new to both java andb apache tomcat.i am presently using apache tomcat 4.1.31 & j2re-1_4_2_10.when i am running http://127.0.0.1:8080/admin/login.jsp or admin file i am getting the following...
0
rsrinivasan
by: rsrinivasan | last post by:
Hi All, When i run my JSP program, ihave the following exception. How i solve this problem? HTTP Status 500 - ...
1
by: sethupnr | last post by:
when i'm using a simple JSP-mysql code it shows some HTTP status 500 error.But simple JSP program without databse is running , Please help how to solve this problem. I'm new to JSP. my...
3
by: ajithraj | last post by:
haiii pls help me to solve this.. whenever i tried to login,it shows an error msg: Compile failed; see the compiler error output for details. at...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.