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

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 8165
do you just want the form_load event to make other timers start?

private void Form1_Load(...)
{

Form2 frm = new Form2;

frm.Timer1.Start();

}
--
-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.comwrote in message
news:Oh**************@TK2MSFTNGP04.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.machin AT dot.state.fl.uswrote
in message news:O4**************@TK2MSFTNGP04.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.comwrote in message
news:Oh**************@TK2MSFTNGP04.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 BackgroundWorker 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.machin AT dot.state.fl.uswrote
in message news:O4**************@TK2MSFTNGP04.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.comwrote in message
news:Oh**************@TK2MSFTNGP04.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...

************CODE*****************
frmMain frmParent = (frmMain)this.TopLevelControl;

frmParent.SetProgressBarValue(50, true);

frmParent.SetStatusBarText("Retrieving Unmapped Product records...", true);

DataSet ds = boProductClientLoadView.GetDataSet();
************************************
frmParent.SetProgressBarValue(75, true);

frmParent.SetStatusBarText("Loading data into grid...", true);

ugUnmappedProducts.DataSource = ds.Tables[0];
**************************************

frmParent.SetProgressBarValue(100, true);

frmParent.SetStatusBarText("Complete.", 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" <jmmgoalsteratyahoodotcomwrote in message
news:0A**********************************@microsof t.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.comwrote in message
news:OY****************@TK2MSFTNGP05.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.machin AT dot.state.fl.us>
wrote in message news:O4**************@TK2MSFTNGP04.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.comwrote in message
news:Oh**************@TK2MSFTNGP04.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
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...
8
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...
2
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...
7
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...
10
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...
4
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...
8
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...
4
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. ...
11
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.