473,785 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Clos e()" 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.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum & "\tbl.zip"

Dim strEdit24CurrPa th As String = frmAirline.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum &
"\tblm24.tx t"

clsUnzip.Unzip( strCurrPath)

Dim objReader As New StreamReader(st rEdit24CurrPath )

_TextFile = "tblm24.txt "

txt2469.Text = ""

txt2469.Text = objReader.ReadT oEnd()

objReader.Close ()

Next

Dave Harris
Nov 20 '05 #1
2 1803
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.r r.com> wrote in message
news:i_******** *********@fe3.c olumbus.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.Clos e()" 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.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum & "\tbl.zip"

Dim strEdit24CurrPa th As String = frmAirline.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum &
"\tblm24.tx t"

clsUnzip.Unzip( strCurrPath)

Dim objReader As New StreamReader(st rEdit24CurrPath )

_TextFile = "tblm24.txt "

txt2469.Text = ""

txt2469.Text = objReader.ReadT oEnd()

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.Clos e()" 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.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum & "\tbl.zip"

Dim strEdit24CurrPa th As String = frmAirline.strA ircraftPath &
frmAirline.strA irlinePath & frmActnTdate._A ctn _

& "\" & frmActnTdate._T date & "\" & strCurrFltNum &
"\tblm24.tx t"

clsUnzip.Unzip( strCurrPath)

Dim objReader As New StreamReader(st rEdit24CurrPath )

_TextFile = "tblm24.txt "

txt2469.Text = ""

txt2469.Text = objReader.ReadT oEnd()

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
4221
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 which occured. Would like to utlize this in a small application I am building: I am trying to create vi key-bindings for a simple QMultiLineEdit
7
7617
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 inserting a new record. I am using Application.Lock and .Unlock together with an application variable to negotiate access to the DB routine to one session (user) at a time. This is to ensure that the ID numbers are cleanly incremented, and that no...
15
1451
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 & "\mameversion.txt""") sw.Close()
1
1394
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 create a text file called MameGames.cfg. Later on in my code I parse through the file and pull out information. This all worked great but the file is 25MB. In an attempt to spped up the parsing I added code to take the MameGames.cfg file, open it,...
7
2695
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 a lock pending, for example. I want to be able to stop a thread temporarily, and then optionally resume it or stop it for good.
2
5254
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 Which one? In the last case Sleep must be applied to what(Application, this or what)?
0
2177
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 simple while statement, pausing where input is needed from the user. Now that I have moved on to VB, I can seem to find a way to pause the while statements until the user does something (e.g. clicks a button). When i start my app, if just throws...
12
3330
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 highly appreciated. Thanks!
2
1849
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 done and Word is closed, I want the MFC application to regain control and continue with doing something else. It's kind of like having it take a break until Microsoft Word is closed. How can this be implemented?
3
3903
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 idea is to start the progress Bar Control by clicking on the Start Button and I would like to pause (Stop Button) the process at anytime and continue it when I click on the Start Button.I had a look at the following homepage:...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8978
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.