473,804 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with events in C#(beginer's question)

2 New Member
I need help getting 3 classes to talk to each other. A gui, a delegate library, and the actual working class.(no pun intended)

In this example i want the button to start a short thread that will output to the rich text box rtbLog. I would be very thankful if someone could walk me through this.



Expand|Select|Wrap|Line Numbers
  1.         private void btn_TimedTurn_Click(object sender, EventArgs e)
  2.         {
  3.             log Timedexec = new log();
  4.             Timedexec.start();
  5.         }
  6.         private class log
  7.         {
  8.             public void start(){
  9.                 for(int i=1; i<=20 ;i++)
  10.                 {
  11.                     Thread.Sleep(300);
  12.  
  13.                 }
  14.             }
  15.         }
  16.  
  17.         private void rtbLog_TextReciver(string income)
  18.         {
  19.             rtbLog.AppendText(income);
  20.         }
  21.  
Nov 30 '06 #1
0 824

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

Similar topics

3
4892
by: ibm_97 | last post by:
Session 1: $db2 +c db2 => set current isolation = UR db2 => select * from t T1 ------ ABC
5
1785
by: Prem Mallappa | last post by:
Hi everybody here is my code to print all nonblank character on Input.. This program according to my knowledge should run till i press Ctrl+D but,,, this is parsing the input untill i press RETURN ( ENTER).. Why is it so.. thx in advance prem mallappa #include <stdio.h>
16
3263
by: Merlin | last post by:
I have created a users control with a text box and button on it, what I want to do is override the usercontrol Keydown events with that of the Text box. What is the correct syntax to accomplish this? Example of my text box sub:- Private Sub Edit_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Edit.KeyDown End Sub Thanks
1
1557
by: itsjyotika | last post by:
Hello Everyone, I need to read data from a CVS file(i created it from micosoft excel) and then need to match it with the one of the date from the command line.If the date is there then it should say yes or else it should say no. I am not getting how to do this as i am just a beginer in perl. Can anybody help me in writting the code. the files r toooo.. big to be attached , so i have just shown a tiny portion of it. thanks in advance, rimjim...
5
3235
by: hn.ft.pris | last post by:
Hi: I'm a beginer of STL, and I'm wondering why none of below works: ######################################################################## .......... string str("string"); if ( str == "s" ) cout << "First character is s" << endl; OR: string str("string"); string::iterator it = str.begin();
1
1249
by: hamed steph | last post by:
i'm a beginer in programing and i need very much your help .i need explanation about while statement (loop initialization and structure of while ) also qualifier (long,short,unsigned ,signed,) type of variable (character and double). think you.......
1
2525
by: slikrik98 | last post by:
Greetings, I believe I have narrowed down my issues to one simple question, and I'm hoping someone with async events experience can help me out. My question is: how is using EventsHelper.FireAsync() different from using EventsHelper.Fire() BUT having the listener's event handler spawn a new thread to do the work? In my program, I have a data feed coming in and I have a separate form that has a DataGridView on it. Each time a message...
3
2397
by: Lester | last post by:
I'm driving myself crazy with a problem in trying to translate a query written for Access to that for SQL server. I would think that I would use a trigger, but am not sure how to set it up. We have a database that manages bookings in four banquet halls. It was running in an Access database, but two years ago, I migrated it to SQL server. In the access database I used VBA to check to ensure no duplicate bookings. I wanted no dup...
9
1542
by: README | last post by:
so what i need to do is implement a code that will take the maximum number in a array and put it into another array. events is an array that contains numbers that was extracted from a file. Count is the number of numbers in the array events because i did not know how many numbers i was reading. numDays is also an array.eventNumDays is the array for which i need to put the maximun number that numDays contains. but this is just not the any...
0
9595
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10354
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9175
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6867
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.