i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
I try to use timer to call form_load, but it fails. so any advice?
is there window form refresh property? I try to set up window form refresh
per minute.
>
I suggest to describe in more detail what exactly you want to archieve.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
>
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
Thanks
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
>
Sub RefreshMyThings
'any refresh here
end sub
>
you can get this sub called by a timer. Just add the timer and schedule
the refresh
>
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
>
.... what this would be good for is a mistery ! :)
>
-Tom
>
martin1 ha scritto:
>
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
I try to use timer to call form_load, but it fails. so any advice?
Thanks
"Herfried K. Wagner [MVP]" wrote:
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
>
I suggest to describe in more detail what exactly you want to archieve.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
>
>
what are you actually trying to do? Can you post some simple code to
explain the main idea?
-tom
martin1 ha scritto:
Thank you, Tom,
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
>
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
>
Thanks
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
I suggest to describe in more detail what exactly you want to archieve.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
"tommaso.gastal di@uniroma1.it" wrote:
what are you actually trying to do? Can you post some simple code to
explain the main idea?
>
-tom
martin1 ha scritto:
>
Thank you, Tom,
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
Thanks
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
>
Sub RefreshMyThings
'any refresh here
end sub
>
you can get this sub called by a timer. Just add the timer and schedule
the refresh
>
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
>
.... what this would be good for is a mistery ! :)
>
-Tom
>
martin1 ha scritto:
>
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
I try to use timer to call form_load, but it fails. so any advice?
Thanks
"Herfried K. Wagner [MVP]" wrote:
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
>
I suggest to describe in more detail what exactly you want to archieve.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
>
>
>
>
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
-tom
martin1 ha scritto:
Hi, Tom,
>
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
>
>
>
"tommaso.gastal di@uniroma1.it" wrote:
>
what are you actually trying to do? Can you post some simple code to
explain the main idea?
-tom
martin1 ha scritto:
Thank you, Tom,
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
>
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
>
Thanks
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
I suggest to describe in more detail what exactly you want to archieve.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
-tom
martin1 ha scritto:
Hi, Tom,
>
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
>
>
>
"tommaso.gastal di@uniroma1.it" wrote:
>
what are you actually trying to do? Can you post some simple code to
explain the main idea?
-tom
martin1 ha scritto:
Thank you, Tom,
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
>
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
>
Thanks
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
I suggest to describe in more detail what exactly you want to archieve.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
I try to set timer to run form_load every minute, but it fail. The code
snippet is below:
-------------Code start------------
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArg s)
Handles MyBase.Load
'call timer for refresh app every minute
TimerAppRunPerM inute()
End Sub
'*** create timer for refresh app per minute ***
Private Sub TimerAppRunPerM inute()
AddHandler comTimerApp.Ela psed, AddressOf ComOnTimedEvent
'Set the Interval to 60 seconds.
comTimerApp.Int erval = 60000
comTimerApp.Ena bled = True
End Sub
Private Sub ComOnTimedEvent (ByVal source As Object, ByVal e As
ElapsedEventArg s)
Form_Load(sourc e, e)
End Sub
----------code end--------------
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
>
-tom
>
martin1 ha scritto:
>
Hi, Tom,
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
"tommaso.gastal di@uniroma1.it" wrote:
what are you actually trying to do? Can you post some simple code to
explain the main idea?
>
-tom
martin1 ha scritto:
>
Thank you, Tom,
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
Thanks
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
>
Sub RefreshMyThings
'any refresh here
end sub
>
you can get this sub called by a timer. Just add the timer and schedule
the refresh
>
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
>
.... what this would be good for is a mistery ! :)
>
-Tom
>
martin1 ha scritto:
>
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
I try to use timer to call form_load, but it fails. so any advice?
Thanks
"Herfried K. Wagner [MVP]" wrote:
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
>
I suggest to describe in more detail what exactly you want to archieve.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
>
>
>
>
>
>
Hmmm... your code seems meaningless to me. Why don't you say what is
what you are trying to achieve. Do you wish your form to stay on *top*
of other forms? Do you wish to *activate* it every so often. Do you
wish to *invalidate* and repaint it or what? What does the form has on
it? What is the purpose of attempting a form reload?
-tom
martin1 ha scritto:
Hi, Tom,
>
I try to set timer to run form_load every minute, but it fail. The code
snippet is below:
>
-------------Code start------------
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArg s)
Handles MyBase.Load
>
'call timer for refresh app every minute
TimerAppRunPerM inute()
>
End Sub
>
'*** create timer for refresh app per minute ***
Private Sub TimerAppRunPerM inute()
AddHandler comTimerApp.Ela psed, AddressOf ComOnTimedEvent
'Set the Interval to 60 seconds.
comTimerApp.Int erval = 60000
comTimerApp.Ena bled = True
End Sub
>
Private Sub ComOnTimedEvent (ByVal source As Object, ByVal e As
ElapsedEventArg s)
Form_Load(sourc e, e)
End Sub
----------code end--------------
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
-tom
martin1 ha scritto:
Hi, Tom,
>
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
>
>
>
"tommaso.gastal di@uniroma1.it" wrote:
>
what are you actually trying to do? Can you post some simple code to
explain the main idea?
-tom
martin1 ha scritto:
Thank you, Tom,
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
>
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
>
Thanks
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
I suggest to describe in more detail what exactly you want to archieve.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
What I want to do is refresh the app every minute since the app strat
running. the form load event is retrieve data from db and bind dataset to
datagridview which display data from database. Since the data in the db is
update per minute, so the datagridview should refresh every minute to
display/reflect new data. I try to reload the form to achieve this, but it
doesn't work, any alternative solution?
Thank you a lot in advance
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin,
>
Hmmm... your code seems meaningless to me. Why don't you say what is
what you are trying to achieve. Do you wish your form to stay on *top*
of other forms? Do you wish to *activate* it every so often. Do you
wish to *invalidate* and repaint it or what? What does the form has on
it? What is the purpose of attempting a form reload?
>
-tom
>
martin1 ha scritto:
>
Hi, Tom,
I try to set timer to run form_load every minute, but it fail. The code
snippet is below:
-------------Code start------------
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArg s)
Handles MyBase.Load
'call timer for refresh app every minute
TimerAppRunPerM inute()
End Sub
'*** create timer for refresh app per minute ***
Private Sub TimerAppRunPerM inute()
AddHandler comTimerApp.Ela psed, AddressOf ComOnTimedEvent
'Set the Interval to 60 seconds.
comTimerApp.Int erval = 60000
comTimerApp.Ena bled = True
End Sub
Private Sub ComOnTimedEvent (ByVal source As Object, ByVal e As
ElapsedEventArg s)
Form_Load(sourc e, e)
End Sub
----------code end--------------
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
>
-tom
>
martin1 ha scritto:
>
Hi, Tom,
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
"tommaso.gastal di@uniroma1.it" wrote:
what are you actually trying to do? Can you post some simple code to
explain the main idea?
>
-tom
martin1 ha scritto:
>
Thank you, Tom,
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
Thanks
"tommaso.gastal di@uniroma1.it" wrote:
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
>
Sub RefreshMyThings
'any refresh here
end sub
>
you can get this sub called by a timer. Just add the timer and schedule
the refresh
>
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
>
.... what this would be good for is a mistery ! :)
>
-Tom
>
martin1 ha scritto:
>
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
I try to use timer to call form_load, but it fails. so any advice?
Thanks
"Herfried K. Wagner [MVP]" wrote:
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
>
I suggest to describe in more detail what exactly you want to archieve.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
>
>
>
>
>
>
>
>
Hi Martin, You have actually provided the answer yourself.
Don't put any working code under the load event.
If you need to refresh the grid, for some public display purpose,
you just re-run the extraction and binding code.
-t
martin1 ha scritto:
hi, Tom,
>
What I want to do is refresh the app every minute since the app strat
running. the form load event is retrieve data from db and bind dataset to
datagridview which display data from database. Since the data in the db is
update per minute, so the datagridview should refresh every minute to
display/reflect new data. I try to reload the form to achieve this, but it
doesn't work, any alternative solution?
>
Thank you a lot in advance
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin,
Hmmm... your code seems meaningless to me. Why don't you say what is
what you are trying to achieve. Do you wish your form to stay on *top*
of other forms? Do you wish to *activate* it every so often. Do you
wish to *invalidate* and repaint it or what? What does the form has on
it? What is the purpose of attempting a form reload?
-tom
martin1 ha scritto:
Hi, Tom,
>
I try to set timer to run form_load every minute, but it fail. The code
snippet is below:
>
-------------Code start------------
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArg s)
Handles MyBase.Load
>
'call timer for refresh app every minute
TimerAppRunPerM inute()
>
End Sub
>
'*** create timer for refresh app per minute ***
Private Sub TimerAppRunPerM inute()
AddHandler comTimerApp.Ela psed, AddressOf ComOnTimedEvent
'Set the Interval to 60 seconds.
comTimerApp.Int erval = 60000
comTimerApp.Ena bled = True
End Sub
>
Private Sub ComOnTimedEvent (ByVal source As Object, ByVal e As
ElapsedEventArg s)
Form_Load(sourc e, e)
End Sub
----------code end--------------
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin, I am afraid that if you do not make a little effort to
explain your problem in an intelligible manner, you won't get much help
with your problem...
-tom
martin1 ha scritto:
Hi, Tom,
>
what i want to do is like web-based application refresh by setting up
<meta-equiv="refresh" content ="60">. Thanks
>
>
>
"tommaso.gastal di@uniroma1.it" wrote:
>
what are you actually trying to do? Can you post some simple code to
explain the main idea?
-tom
martin1 ha scritto:
Thank you, Tom,
>
I knew what you said, take refresh thing into sub, then timer control the
sub. what i want to do is refresh the window application every minute since
starting run.
>
one solution may or may not correct, that is timer to refresh form_load
event to meet this requirement since form_load is initilize the application,
but it doesn't work. any more advice?
>
Thanks
>
"tommaso.gastal di@uniroma1.it" wrote:
>
Hi Martin I am afraid it's not clear at all what you want to do.
Anyway... generally talking... you can take the code necessary for the
refresh and put within a sub (instead of under the load event)
Sub RefreshMyThings
'any refresh here
end sub
you can get this sub called by a timer. Just add the timer and schedule
the refresh
Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Timer1.Tick
me.RefreshMyThi ngs
End Sub
.... what this would be good for is a mistery ! :)
-Tom
martin1 ha scritto:
i had window application, everytime run the app, the form_load event starts
run , what I want to do is to refresh the form-load event every minute. the
whole purpose is to refresh the app every minute.
>
I try to use timer to call form_load, but it fails. so any advice?
>
Thanks
>
"Herfried K. Wagner [MVP]" wrote:
>
"martin1" <martin1@discus sions.microsoft .comschrieb:
is there window form refresh property? I try to set up window form refresh
per minute.
I suggest to describe in more detail what exactly you want to archieve.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Comment