Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

Can't get the DispatcherTimer to work

$
0
0
I've got this code so far - but it's not liking the .Tick assignment. This is C#

Code:

private DispatcherTimer mainTimer;
.
.
.
            mainTimer = new DispatcherTimer(DispatcherPriority.Normal);
            mainTimer.Interval = new TimeSpan(250);
            mainTimer.Tick += new EventHandler(SendToReader);
.
.
.
      private void SendToReader() // (object sender, RoutedEventArgs e) //(object objectState)
        {

The error is on the .Tick assignment - currently it's saying:

No Overload for SendToReader matches delegate System.EventHandler

I've tried many different ways - nothing is making it work. What would the arguments for SendToReader have to be for this DispatcherTimer to work??

Thanks!

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>