Click here to Skip to main content
15,900,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Sending Email without using Outlook Pin
nlarson1117-Oct-07 8:59
nlarson1117-Oct-07 8:59 
GeneralRe: Sending Email without using Outlook Pin
yogesh_kumar_agarwal17-Oct-07 10:34
yogesh_kumar_agarwal17-Oct-07 10:34 
GeneralRe: Sending Email without using Outlook Pin
svanwass18-Oct-07 9:04
svanwass18-Oct-07 9:04 
AnswerRe: Sending Email without using Outlook Pin
GuyThiebaut17-Oct-07 9:03
professionalGuyThiebaut17-Oct-07 9:03 
GeneralRe: Sending Email without using Outlook Pin
yogesh_kumar_agarwal17-Oct-07 10:35
yogesh_kumar_agarwal17-Oct-07 10:35 
GeneralRe: Sending Email without using Outlook Pin
GuyThiebaut17-Oct-07 23:03
professionalGuyThiebaut17-Oct-07 23:03 
AnswerRe: Sending Email without using Outlook Pin
Christian Graus17-Oct-07 10:56
protectorChristian Graus17-Oct-07 10:56 
QuestionCan we read return from a process without waiting its completion? Pin
ATC17-Oct-07 7:59
ATC17-Oct-07 7:59 
With the help of Pete (earlier post) I am able to read & display return lines then close a process through command line (MS-DOS window) with the following codes:
<br />
        Dim ps1 As New Process<br />
<br />
        ps1.StartInfo.FileName = "cmd.exe"<br />
        ps1.StartInfo.WindowStyle = ProcessWindowStyle.Normal<br />
        ps1.StartInfo.CreateNoWindow = False<br />
        ps1.StartInfo.UseShellExecute = False<br />
        ps1.StartInfo.RedirectStandardOutput = True<br />
        ps1.StartInfo.RedirectStandardInput = True<br />
        ps1.Start()<br />
<br />
        Dim s1 As String<br />
<br />
        Dim sIn As StreamWriter = ps1.StandardInput<br />
        Dim sOut As StreamReader = ps1.StandardOutput<br />
        sIn.AutoFlush = True<br />
        sIn.Write("dir/p" & System.Environment.NewLine)<br />
<br />
        Thread.Sleep(100)<br />
        s1 = sOut.ReadLine<br />
        ps1.Kill()<br />
<br />
        ListBox.Items.Clear()<br />
<br />
        '// *** Display every return line *** //<br />
        While s1 <> "End of Line"<br />
            ListBox.Items.Add(s1)<br />
            s1 = sOut.ReadLine<br />
        End While<br />
<br />
        ListBox.Items.Add(s1)<br />


However, if the process does not stop then the ListBox can not update data (I think because the process takes more priority then the ListBox?)

1. Can we modify the above codes so that we can update the ListBox without waiting the process completed?

2. If it is not possible ... is there another way to do it?

Thanks for any help! D'Oh! | :doh:
AnswerRe: Can we read return from a process without waiting its completion? Pin
Dave Kreskowiak17-Oct-07 15:26
mveDave Kreskowiak17-Oct-07 15:26 
GeneralRe: Can we read return from a process without waiting its completion? Pin
ATC18-Oct-07 6:05
ATC18-Oct-07 6:05 
GeneralRe: Can we read return from a process without waiting its completion? Pin
svanwass18-Oct-07 9:09
svanwass18-Oct-07 9:09 
GeneralRe: Can we read return from a process without waiting its completion? Pin
Dave Kreskowiak18-Oct-07 12:09
mveDave Kreskowiak18-Oct-07 12:09 
AnswerRe: Can we read return from a process without waiting its completion? Pin
Luc Pattyn17-Oct-07 15:38
sitebuilderLuc Pattyn17-Oct-07 15:38 
GeneralRe: Can we read return from a process without waiting its completion? Pin
ATC18-Oct-07 6:06
ATC18-Oct-07 6:06 
QuestionPerforming drag and drop between two datagridviews? Pin
Mr Oizo17-Oct-07 7:19
Mr Oizo17-Oct-07 7:19 
AnswerRe: Performing drag and drop between two datagridviews? Pin
Dave Kreskowiak17-Oct-07 14:21
mveDave Kreskowiak17-Oct-07 14:21 
QuestionButton with menu in outlook Pin
Koltz17-Oct-07 6:56
Koltz17-Oct-07 6:56 
Questioncatch internet explorer web site request Pin
Jamal Encami17-Oct-07 5:33
professionalJamal Encami17-Oct-07 5:33 
AnswerRe: catch internet explorer web site request Pin
Colin Angus Mackay17-Oct-07 6:12
Colin Angus Mackay17-Oct-07 6:12 
GeneralRe: catch internet explorer web site request Pin
Dave Kreskowiak17-Oct-07 6:58
mveDave Kreskowiak17-Oct-07 6:58 
AnswerRe: catch internet explorer web site request Pin
Dave Kreskowiak17-Oct-07 6:12
mveDave Kreskowiak17-Oct-07 6:12 
AnswerRe: catch internet explorer web site request Pin
svanwass18-Oct-07 9:07
svanwass18-Oct-07 9:07 
AnswerRe: catch internet explorer web site request Pin
Jamal Encami18-Oct-07 13:10
professionalJamal Encami18-Oct-07 13:10 
Questionplease help Pin
Sonia Gupta17-Oct-07 4:25
Sonia Gupta17-Oct-07 4:25 
AnswerRe: please help Pin
Dave Kreskowiak17-Oct-07 5:15
mveDave Kreskowiak17-Oct-07 5:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.