Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8986307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:31:05+00:00 2026-06-15T21:31:05+00:00

Error 1 The base class or interface ‘System.ComponentModel.Component’ in assembly ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’

  • 0

Error 1 The base class or interface 'System.ComponentModel.Component' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' referenced by type 'System.Windows.Forms.Timer' could not be resolved

k:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll App2

I got this error message after adding system.windows.forms reference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:31:07+00:00Added an answer on June 15, 2026 at 9:31 pm

    Since you are using Wpf I made quick working example. Make sure your project references look like this.

    enter image description here

    MainWindow

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Windows.Forms;
    
    namespace WpfApplication1
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            Timer tmr = new Timer();
            public MainWindow()
            {
                InitializeComponent();
                tmr.Interval = 2000;
                tmr.Tick += new EventHandler(tmr_Tick);
                tmr.Start();
            }
    
            void tmr_Tick(object sender, EventArgs e)
            {
                tmr.Stop();
                throw new NotImplementedException();
            }
        }
    }
    

    And as roken stated it would be easier if you could use the Wpf Dispatcher Timer. IN looking at the example link there is no pressing need to be using a Windows Form Timer, the Dispatcher timer will work fine in this case since this is a WPF program.

    Edit Modified based on your link

    public partial class MainWindow : Window
    {
        System.Windows.Threading.DispatcherTimer tmrStart = new System.Windows.Threading.DispatcherTimer();
        System.Windows.Threading.DispatcherTimer tmrStop = new System.Windows.Threading.DispatcherTimer();
        public MainWindow()
        {
            InitializeComponent();
            tmrStart.Interval = TimeSpan.FromSeconds(2); //Delay before shown
            tmrStop.Interval = TimeSpan.FromSeconds(3);  //Delay after shown
            tmrStart.Tick += new EventHandler(tmr_Tick);
            tmrStop.Tick += new EventHandler(tmrStop_Tick);
    
        }
    
        void tmrStop_Tick(object sender, EventArgs e)
        {
            tmrStop.Stop();
            label1.Content = "";
        }
    
        void tmr_Tick(object sender, EventArgs e)
        {
            tmrStart.Stop();
            label1.Content = "Success";
            tmrStop.Start();
        }
    
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            tmrStart.Start();
        }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ActiveRecord before_save method throwing an odd error: class MyThing < ActiveRecord::Base
Hers is my application.rb class ApplicationController < ActionController::Base protect_from_forgery rescue_from CanCan::AccessDenied do |exception| flash[:error]
I need to implement the IDataErrorInfo interface in a base class. The interface requires
I've got a interface that's implemented as an abstract base class with a number
While we can inherit from base class/interface, why can't we declare a List<> using
I am using a fluent interface with inheritance. I declared the base class Constructor
I've got an abstract base class that defines an interface to data sinks. Concrete
Given the following: class Base<T> {/*...*/} class Der<T>: Base<T> {/*...*/} interface Sth<T>{ IEnumerable<Base<T>> Foo
I have the following code: class Interface { virtual void method()=0; }; class Base
Ok so I have these 2 classes class Interface < ActiveRecord::Base belongs_to :hardware end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.