473,320 Members | 1,699 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,320 software developers and data experts.

Pausing the application

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
Nov 20 '05 #1
2 1787
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

"Dave Harris" <dh******@woh.rr.com> wrote in message
news:i_*****************@fe3.columbus.rr.com...
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

Nov 20 '05 #2
Cor
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
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

Nov 20 '05 #3

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

Similar topics

2
by: Srinath Avadhanula | last post by:
Hello, I am wondering if QT has something like QWaitForNextEvent() function. This function would block execution of the application till another key was pressed and then return the event...
7
by: Dr. Know | last post by:
I am working on an ASP page that writes to several databases, ranging from MDBs to x-base. One of the tasks involves using an existing highest value from the DB and incrementing it before...
15
by: jcrouse | last post by:
Here is my code: Dim sw As StreamWriter = File.CreateText(Application.StartupPath & "\mameversion.bat") sw.WriteLine(lblMameExePath.Text & " -help >""" & Application.StartupPath &...
1
by: jcrouse | last post by:
This is sort of a revisited item from about two months ago (don't get mad Cor) with additional code. I am creating a batch file called CreateMameGames.bat. I am then running that batch file to...
7
by: Charles Law | last post by:
My first thought was to call WorkerThread.Suspend but the help cautions against this (for good reason) because the caller has no control over where the thread actually stops, and it might have...
2
by: BLUE | last post by:
I would like to pause an application while the GUI display a Label saying "Logging in...". System.Timers System.Windows.Forms.Timer System.Threading.Timer System.Threading ==Thread.Sleep ...
0
by: Grayzag | last post by:
Hi there, As part of my Software course, i have to create a game. Since I originally started out with python, I was used to it being really easy to create a main loop to control the game with a...
12
by: greg | last post by:
Hi, Can anyone help me with the following issue: How can I pause the execution of a program until a given file is created (by another process) in a specified directory? Any ideas would be...
2
by: ahammad | last post by:
I have an MFC application that opens up a Word document for editing using automation. Is there a way to pause or freeze the MFC application while the Word doc is being edited? After the editing is...
3
by: Lucress Carol | last post by:
Hi everyone, I'm having troubles with pausing and continuing MFC Thread.For test purposes I've created in my MFC Dialog application a progress Bar Control, a Start Button and a Stop Button.The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.