473,414 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

C# call method constantly?

Hi, I have the following method that checks the state of a checkbox on another form, how can I call this method constantly? or when the user press the mouse?

public void Test()
{
if (Form2.cb.Checked)
{
Form1.tb.Text = "YES";
videoCogControl1.Play();
}
}

Thanks.
Nov 28 '08 #1
1 1532
Shashi Sadasivan
1,435 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1.       while(true)
  2.       {               
  3.             if (Form2.cb.Checked)
  4.             {
  5.                 Form1.tb.Text = "YES";
  6.                 videoCogControl1.Play();
  7.             }
  8.       }
that constantly keeps checking !!!

You shud however link to an event which wil disable it.

Something like stop a timer which activatres the checking, when the checkbox is unchecked.

moreover even if the control is located in another form, and you have set it to public, you can access the click event for that checkbox
Nov 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: twins | last post by:
Hi, Iam wondering if there is any method to do the following: 1) When a file is created in a directory in local computer. 2) When the mysql date stored in the DB approaches the current date and...
6
by: Jonathan | last post by:
I am hoping that someone more experienced than myself can point me towards what might be the fastest data lookup method to use for storing ip addresses. My situation is that I will need to maintain...
1
by: Charles | last post by:
Ok, I have an Access 97 GUI with SQL 7.0 backend. On one database I'm constantly getting a call fail. I'm not sure why. From the user accounts it seems to happen mostly when they have the form...
7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
3
by: Dave | last post by:
I have a piece of hardware connected via serial port. I need to send a variety of commands to the box and route the responses back from the receive thread to the correct method call. So e.g. I...
7
by: stellstarin | last post by:
hi all, I have a HTML page with two forms. While trying to add a hidden element in a first form by the default javascript function, the error message 'object does not support this property or...
1
by: J Rice | last post by:
I have a question: When should syslog.closelog() be called? I have a daemon that spends most of its time asleep and quiet, but writes messages to the mail log when active. Should I open the...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
9
by: TomLasky | last post by:
Hi everyone, I'm an old school vb6 user trying to transition to VB.NET. Can anyone suggest a better approach to constantly checking something without using a timer? I'm trying to constantly...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.