I have a Windows Forms Link Label, “Refresh”, that refreshes the display.
In another part of my code, part of a separate windows form, I have a dialog that changes the data loaded into the display in the first place. After executing this other code, pressing “Refresh” updates the data correctly.
Is there a simple way for the dialog menu to “click” the “refresh” Link Label after it has finished altering the data?
Using Visual Studio 2008.
For button is really simple, just use:
Anyway, I’d prefer to do something like:
and call
DoRefresh()instead ofPerformClick()EDIT (according to OP changes):
You can still use my second solution, that is far preferable:
And from outside the form, you can call
DoRefresh()as it is marked public.But, if you really need to programmatically generate a click, just look at Yuriy-Faktorovich’s Answer