how to implement the Refresh action using C#
-
hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony
-
hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony
By writing some code. Handle the key event, work out the user pressed f% and reload whatever data you're displaying.
Christian Graus Driven to the arms of OSX by Vista.
-
By writing some code. Handle the key event, work out the user pressed f% and reload whatever data you're displaying.
Christian Graus Driven to the arms of OSX by Vista.
hello Christian Graus can u illustrate some sample codes plz thanks Tony
-
hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony
Hi I think first you should define the meaning of Refresh for you application.(What) For example, if there is a form that shows a list of customers ,Refresh might be to refill the list .If it's a data entry from you might want to refresh your look up fields that might have been changed by some other users and so on. Then you should decide when this refresh should happen(When). There might be a refresh button on the form or a shortcut key or when user opens a drop down.In either of these cases, you want to handle an event to do the Refresh. For example: We have a method called RefillCustomers that refill customers list and we want a refresh button that do the refresh. The simplest way to make it work it's something like this: handle button clicked event(in form load for example)
refreshButon.Click+=new EventHandler(RefreshButtonClicked);
then we should implement RefreshButtonClicked method:
private void RefreshButtonClicked(object sender,EventArgs e)
{
RefillCustomers();
}and then you should implement the RefillCustomers method.
-
Hi I think first you should define the meaning of Refresh for you application.(What) For example, if there is a form that shows a list of customers ,Refresh might be to refill the list .If it's a data entry from you might want to refresh your look up fields that might have been changed by some other users and so on. Then you should decide when this refresh should happen(When). There might be a refresh button on the form or a shortcut key or when user opens a drop down.In either of these cases, you want to handle an event to do the Refresh. For example: We have a method called RefillCustomers that refill customers list and we want a refresh button that do the refresh. The simplest way to make it work it's something like this: handle button clicked event(in form load for example)
refreshButon.Click+=new EventHandler(RefreshButtonClicked);
then we should implement RefreshButtonClicked method:
private void RefreshButtonClicked(object sender,EventArgs e)
{
RefillCustomers();
}and then you should implement the RefillCustomers method.
hello beatles1692 thanks for u r answer thanks Tony