|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Window Form refreshAll,
is there window form refresh property? I try to set up window form refresh per minute. Thanks "martin1" <mart***@discussions.microsoft.com> schrieb: I suggest to describe in more detail what exactly you want to archieve.> is there window form refresh property? I try to set up window form refresh > per minute. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> 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 Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "martin1" <mart***@discussions.microsoft.com> schrieb: > > 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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick me.RefreshMyThings End Sub .... what this would be good for is a mistery ! :) -Tom martin1 ha scritto: Show quoteHide quote > 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" <mart***@discussions.microsoft.com> schrieb: > > > 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/> > > > > 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 Show quoteHide quote "tommaso.gasta***@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(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Timer1.Tick > me.RefreshMyThings > 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" <mart***@discussions.microsoft.com> schrieb: > > > > 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: Show quoteHide quote > 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.gasta***@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(ByVal sender As System.Object, ByVal e As > > System.EventArgs) Handles Timer1.Tick > > me.RefreshMyThings > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > 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, Tom,
what i want to do is like web-based application refresh by setting up <meta-equiv="refresh" content ="60">. Thanks Show quoteHide quote "tommaso.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > System.EventArgs) Handles Timer1.Tick > > > me.RefreshMyThings > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > 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: Show quoteHide quote > Hi, Tom, > > what i want to do is like web-based application refresh by setting up > <meta-equiv="refresh" content ="60">. Thanks > > > > "tommaso.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > System.EventArgs) Handles Timer1.Tick > > > > me.RefreshMyThings > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > 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: Show quoteHide quote > Hi, Tom, > > what i want to do is like web-based application refresh by setting up > <meta-equiv="refresh" content ="60">. Thanks > > > > "tommaso.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > System.EventArgs) Handles Timer1.Tick > > > > me.RefreshMyThings > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > 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, 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.EventArgs) Handles MyBase.Load 'call timer for refresh app every minute TimerAppRunPerMinute() End Sub '*** create timer for refresh app per minute *** Private Sub TimerAppRunPerMinute() AddHandler comTimerApp.Elapsed, AddressOf ComOnTimedEvent 'Set the Interval to 60 seconds. comTimerApp.Interval = 60000 comTimerApp.Enabled = True End Sub Private Sub ComOnTimedEvent(ByVal source As Object, ByVal e As ElapsedEventArgs) Form_Load(source, e) End Sub ----------code end-------------- Show quoteHide quote "tommaso.gasta***@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.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > > System.EventArgs) Handles Timer1.Tick > > > > > me.RefreshMyThings > > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > > 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,
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: Show quoteHide quote > 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.EventArgs) > Handles MyBase.Load > > 'call timer for refresh app every minute > TimerAppRunPerMinute() > > End Sub > > '*** create timer for refresh app per minute *** > Private Sub TimerAppRunPerMinute() > AddHandler comTimerApp.Elapsed, AddressOf ComOnTimedEvent > 'Set the Interval to 60 seconds. > comTimerApp.Interval = 60000 > comTimerApp.Enabled = True > End Sub > > Private Sub ComOnTimedEvent(ByVal source As Object, ByVal e As > ElapsedEventArgs) > Form_Load(source, e) > End Sub > ----------code end-------------- > > "tommaso.gasta***@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.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > > > System.EventArgs) Handles Timer1.Tick > > > > > > me.RefreshMyThings > > > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > > > 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, 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 Show quoteHide quote "tommaso.gasta***@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.EventArgs) > > Handles MyBase.Load > > > > 'call timer for refresh app every minute > > TimerAppRunPerMinute() > > > > End Sub > > > > '*** create timer for refresh app per minute *** > > Private Sub TimerAppRunPerMinute() > > AddHandler comTimerApp.Elapsed, AddressOf ComOnTimedEvent > > 'Set the Interval to 60 seconds. > > comTimerApp.Interval = 60000 > > comTimerApp.Enabled = True > > End Sub > > > > Private Sub ComOnTimedEvent(ByVal source As Object, ByVal e As > > ElapsedEventArgs) > > Form_Load(source, e) > > End Sub > > ----------code end-------------- > > > > "tommaso.gasta***@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.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > > > > System.EventArgs) Handles Timer1.Tick > > > > > > > me.RefreshMyThings > > > > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > > > > 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: Show quoteHide quote > 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.gasta***@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.EventArgs) > > > Handles MyBase.Load > > > > > > 'call timer for refresh app every minute > > > TimerAppRunPerMinute() > > > > > > End Sub > > > > > > '*** create timer for refresh app per minute *** > > > Private Sub TimerAppRunPerMinute() > > > AddHandler comTimerApp.Elapsed, AddressOf ComOnTimedEvent > > > 'Set the Interval to 60 seconds. > > > comTimerApp.Interval = 60000 > > > comTimerApp.Enabled = True > > > End Sub > > > > > > Private Sub ComOnTimedEvent(ByVal source As Object, ByVal e As > > > ElapsedEventArgs) > > > Form_Load(source, e) > > > End Sub > > > ----------code end-------------- > > > > > > "tommaso.gasta***@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.gasta***@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.gasta***@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(ByVal sender As System.Object, ByVal e As > > > > > > > > System.EventArgs) Handles Timer1.Tick > > > > > > > > me.RefreshMyThings > > > > > > > > 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" <mart***@discussions.microsoft.com> schrieb: > > > > > > > > > > > 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/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Date Sort
Scrolling DataGrid's selected row out of view selects next control Sharing Class Data With Multiple Forms Difference between MyBase and Me How to Get DataSet ot DataTable from DataGrid Limit bandwith of my application VB Net 2005 and Email! combobox view display width question Empty Recycle bin - VB.NET code Images in a Windows DataGrid |
|||||||||||||||||||||||