473,544 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting a timer tick to fire during a form load

Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that I'm
opening's _Tick to actually fire off. Any help any of you gurus can give me
will be much appreciated :).

-Jayyde
Jul 19 '06 #1
7 8189
do you just want the form_load event to make other timers start?

private void Form1_Load(...)
{

Form2 frm = new Form2;

frm.Timer1.Star t();

}
--
-iwdu15
Jul 19 '06 #2
Hi,

I'm not sure what you want, are you sauing that you create several other
forms (child form) in the form_load event and yuo want to know how long does
this take?

what is the use of the timer? , What timer are you using?
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jayyde" <an**@hotmail.c omwrote in message
news:Oh******** ******@TK2MSFTN GP04.phx.gbl...
Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that I'm
opening's _Tick to actually fire off. Any help any of you gurus can give
me will be much appreciated :).

-Jayyde

Jul 19 '06 #3
Basically I have a grid that is loaded on it's form's load event. I have it
(in between certain lines of code) incrementing a progress bar on the mdi
container form. What I would like a timer control to do is up the progress
bar by 1 every time it ticks so the user still knows something is happening
during the lines of code that take forever in one call (such as the actual
getdataset() call). Unfortunately while lines of code such as that are
executing I can't get either the timer on the mdi container or the timer on
the form that is loading to fire. If that doesn't explain it well let me
know and I'll give it another whack...

Thanks :).

-Jayyde
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us wrote
in message news:O4******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

I'm not sure what you want, are you sauing that you create several other
forms (child form) in the form_load event and yuo want to know how long
does this take?

what is the use of the timer? , What timer are you using?
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jayyde" <an**@hotmail.c omwrote in message
news:Oh******** ******@TK2MSFTN GP04.phx.gbl...
>Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that I'm
opening's _Tick to actually fire off. Any help any of you gurus can give
me will be much appreciated :).

-Jayyde


Jul 19 '06 #4
well it doesnt make sense to have a progressbar keep track of nothing, maybe
you should rethink ur UI....just my 2 cents, but show us your code and maybe
we can see whats going on
--
-iwdu15
Jul 19 '06 #5
Jayyde,
Take a look at the BackgroundWorke r class, which is specifically designed to
help with this type of long running background thread and update the UI
situation:

http://msdn2.microsoft.com/en-us/lib...undworker.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jayyde" wrote:
Basically I have a grid that is loaded on it's form's load event. I have it
(in between certain lines of code) incrementing a progress bar on the mdi
container form. What I would like a timer control to do is up the progress
bar by 1 every time it ticks so the user still knows something is happening
during the lines of code that take forever in one call (such as the actual
getdataset() call). Unfortunately while lines of code such as that are
executing I can't get either the timer on the mdi container or the timer on
the form that is loading to fire. If that doesn't explain it well let me
know and I'll give it another whack...

Thanks :).

-Jayyde
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us wrote
in message news:O4******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

I'm not sure what you want, are you sauing that you create several other
forms (child form) in the form_load event and yuo want to know how long
does this take?

what is the use of the timer? , What timer are you using?
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jayyde" <an**@hotmail.c omwrote in message
news:Oh******** ******@TK2MSFTN GP04.phx.gbl...
Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that I'm
opening's _Tick to actually fire off. Any help any of you gurus can give
me will be much appreciated :).

-Jayyde


Jul 19 '06 #6
Here's an example of what I'm talking about--and how it's not wanting to
keep track of nothing--it's just giving the user the impression that
something is still happening when I can't keep track of exactly how much is
getting done per amount of time manually--just a little fascade for them...

************COD E************** ***
frmMain frmParent = (frmMain)this.T opLevelControl;

frmParent.SetPr ogressBarValue( 50, true);

frmParent.SetSt atusBarText("Re trieving Unmapped Product records...", true);

DataSet ds = boProductClient LoadView.GetDat aSet();
*************** *************** ******
frmParent.SetPr ogressBarValue( 75, true);

frmParent.SetSt atusBarText("Lo ading data into grid...", true);

ugUnmappedProdu cts.DataSource = ds.Tables[0];
*************** *************** ********

frmParent.SetPr ogressBarValue( 100, true);

frmParent.SetSt atusBarText("Co mplete.", true);

*************** *************** **********

The starred lines are examples of lines of code where work is being done by
the app, but I can't track it. So what I want to happen is have a timer
tick away every second or two and just jump that progress bar up 1% each
time so the user thinks/knows that SOMETHING is happening still. Otherwise
it kind of looks like the app just froze on 50% or 75% while it does its
thing.

To Peter:

That sounds like a brilliant plan and one that I would immediately try
to implement if we weren't still trying to talk the boss-man into plunking
down the extra coin to upgrade us from VS 2003 to 2005. Is there anything
that would accomplish the same thing in 2003?

Thanks :).

-Jayyde

"iwdu15" <jmmgoalsteraty ahoodotcomwrote in message
news:0A******** *************** ***********@mic rosoft.com...
well it doesnt make sense to have a progressbar keep track of nothing,
maybe
you should rethink ur UI....just my 2 cents, but show us your code and
maybe
we can see whats going on
--
-iwdu15

Jul 20 '06 #7
Hi,

You have to use a backgound thread to do that.

Do a search by Control.Invoke and you will see a lot of post regarding this
problem
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Jayyde" <an**@hotmail.c omwrote in message
news:OY******** ********@TK2MSF TNGP05.phx.gbl. ..
Basically I have a grid that is loaded on it's form's load event. I have
it (in between certain lines of code) incrementing a progress bar on the
mdi container form. What I would like a timer control to do is up the
progress bar by 1 every time it ticks so the user still knows something is
happening during the lines of code that take forever in one call (such as
the actual getdataset() call). Unfortunately while lines of code such as
that are executing I can't get either the timer on the mdi container or
the timer on the form that is loading to fire. If that doesn't explain it
well let me know and I'll give it another whack...

Thanks :).

-Jayyde
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
wrote in message news:O4******** ******@TK2MSFTN GP04.phx.gbl...
>Hi,

I'm not sure what you want, are you sauing that you create several other
forms (child form) in the form_load event and yuo want to know how long
does this take?

what is the use of the timer? , What timer are you using?
--
--
Ignacio Machin,
ignacio.mach in AT dot.state.fl.us
Florida Department Of Transportation

"Jayyde" <an**@hotmail.c omwrote in message
news:Oh******* *******@TK2MSFT NGP04.phx.gbl.. .
>>Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that
I'm opening's _Tick to actually fire off. Any help any of you gurus can
give me will be much appreciated :).

-Jayyde



Jul 20 '06 #8

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

Similar topics

13
7453
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the...
8
2768
by: Daniel P. | last post by:
I'm trying to set a timer that gets called every 3 seconds so I can update a field in the UI with the time elapsed since the process started. What am I doing wrong that timerDF_Tick does not get called? private System.Windows.Forms.Timer timerDF; this.timerDF = new System.Windows.Forms.Timer(this.components);
2
733
by: Michael Evans | last post by:
First, we rely on a stable update rate so that our physics and dynamics calculations and integrations are based on a known interval and therefore are true-to-life. Second, the graphics positions in our image generators are updated by this dynamics application, and we need to update them at the rate they are being refreshed so that we don't...
7
2368
by: Noozer | last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is enabled, and that the interval is low (4000, which should be 4 seconds). To ensure the timer wasn't being inadvertantly reset I put some extra code in the subs that enable and disable the timer. They fire as expected. To test this I added a second timer with a 1...
10
1816
by: Bob | last post by:
I have a splashscreen running on a thread from Sub Main and it works OK. It displays information in a statusbar about queries. I also have a time on the splashscreen, but the tick event never gets fired. In the Load Event if the splashscreen I call the timer's Start() event. HOw do I get the tick event to fire?
4
2881
by: Rich P | last post by:
Greetings, I have a routine I was running in VB6 on a timed schedule. When the timeframe came up, the timer would be disable, the routine would run, and the timer gets enabled. I am trying to migrate this project to vb.net. But when the timer gets disable it is not getting re-enabled after the routine is completed. I added...
8
6839
by: KnighT | last post by:
I have a .net service that runs a System.Threading.Timer. The delegate points to the function that the service should execute when the timer elapses. Problem: The timer is not ticking. I have never used this timer. I used the documentation from Microsoft as a guide, but I cannot get this timer to work. Protected Overrides Sub...
4
2804
by: Bails | last post by:
Hi Im an absolute beginner in programming and am using VB.Net Express. To start my larning I decided to do a "Real World" app instead of "hello world" and am creating a Poker Countdown clock. I pretty much have most things under control and have set it up as follows: Form 1 Contains a DataGridView where users enter in information...
11
2576
by: Hotrod2000 | last post by:
I'm quite new to programming but I'm having problems getting a timer to work in visual studio.net I've created a timer on a form, enabled it and then typed the following code (from the mdsn library as I thought this would be a good start!!!) but nothing happens :- Imports System.Timers
0
7420
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...
0
7602
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7368
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...
0
7704
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5291
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...
0
4911
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...
1
1837
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
983
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
657
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.