Pausing the application

  • Thread starter Thread starter Dave Harris
  • Start date Start date
D

Dave Harris

I am having a bit of trouble with form manipulation. I am working on a
program where the user opens one form and when all the processes are done,
he/she clicks on "Continue" which opens the next form in the program's
sequence where more data processing takes place. Here is a snippet of code
from the form I am currently working on. I need the application to pause
after the "objReader.Close()" statement until the user clicks a button on
the form, whereupon the next iteration of the loop will cause the textbox to
clear, load with new data, and pause until the user clicks the button. It
would be nice if VB.NET has a Pause function. Thanks in advance for your
help!





For i = 1 To Val(frmMaxmin._NumFlights)

Dim strCurrFltNum As String = "00" & i.ToString

strCurrPath = frmAirline.strAircraftPath &
frmAirline.strAirlinePath & frmActnTdate._Actn _

& "\" & frmActnTdate._Tdate & "\" & strCurrFltNum & "\tbl.zip"

Dim strEdit24CurrPath As String = frmAirline.strAircraftPath &
frmAirline.strAirlinePath & frmActnTdate._Actn _

& "\" & frmActnTdate._Tdate & "\" & strCurrFltNum &
"\tblm24.txt"

clsUnzip.Unzip(strCurrPath)

Dim objReader As New StreamReader(strEdit24CurrPath)



_TextFile = "tblm24.txt"

txt2469.Text = ""

txt2469.Text = objReader.ReadToEnd()

objReader.Close()

Next





Dave Harris
 
Hi Dave,

I'm not certain this is what you're after, but here's a suggestion:

You can add an internal loop based on a variable after objreader.close()

while x = true
loop

When your user clicks the button, it should reset x to false; the final step
would be to place
x = true
right after for i = 1 to val, etc, so that it is reset for each iteration
and requires a button click to change it each time.

HTH,

Bernie Yaeger
 
Hi Dave,

You dont have to do nothing for that, if the program is doing nothing it is
only waiting on a event as pushing the button. (This when you not are using
multithreading).

But you can make the button not visible and before the user may push make it
visible.

I hope this helps?

Cor
 
Back
Top