Hello http://www.computerworld.com/action...ticleId=9012149 May someone explain about "SendMessage API call"? Thanks Reply With Quote
abalfazl
Posts
-
SendMessage API call -
Peoblem releasing the event handler?Salam Aghayeh khorramdin! May you explian which function do you use in order to define speech? May I know your email?
-
Event,DelegationAnyone knows the answer?
-
Event,DelegationHello about this: [code] public void OnHandler1(object sender,MyEventArgs e) [/code] May someone explain it? [url]http://www.codeguru.com/csharp/csharp/cs\_delegates/eventhandling/\[/url\]
-
Event,DelegationHello From Programming C#, 4th Edition [code] namespace EventKeyword { // a class to hold the information about the event // in this case it will hold only information // available in the clock class, but could hold // additional state information public class TimeInfoEventArgs : EventArgs { public readonly int hour; public readonly int minute; public readonly int second; public TimeInfoEventArgs(int hour, int minute, int second) { this.hour = hour; this.minute = minute; this.second = second; } } // our subject -- it is this class that other classes // will observe. This class publishes one event: // OnSecondChange. The observers subscribe to that event public class Clock { private int hour; private int minute; private int second; // the delegate the subscribers must implement public delegate void SecondChangeHandler ( object clock, TimeInfoEventArgs timeInformation ); // the keyword event controls access to the delegate public event SecondChangeHandler OnSecondChange; // set the clock running // it will raise an event for each new second public void Run( ) { for(;;) { // sleep 10 milliseconds Thread.Sleep(10); // get the current time System.DateTime dt = System.DateTime.Now; // if the second has changed // notify the subscribers if (dt.Second != second) { // create the TimeInfoEventArgs object // to pass to the subscriber TimeInfoEventArgs timeInformation = new TimeInfoEventArgs( dt.Hour,dt.Minute,dt.Second); // if anyone has subscribed, notify them if (OnSecondChange != null) { OnSecondChange( this,timeInformation); } } // update the state this.second = dt.Second; this.minute = dt.Minute; this.hour = dt.Hour; } } } // an observer. DisplayClock subscribes to the // clock's events. The job of DisplayClock is // to display the current time public class DisplayClock { // given a clock, subscribe to // its SecondChangeHandler event public void Subscribe(Clock theClock) { theClock.OnSecondChange += new Clock.SecondChangeHandler(TimeHasChanged); } // the m
-
Event,DelegationHello [url]http://www.csharp-station.com/Tutorials/Lesson14.aspx\[/url\] [code] using System; using System.Drawing; using System.Windows.forms; // custom delegate public delegate void Startdelegate(); class Eventdemo : form { // custom event public event Startdelegate StartEvent; public Eventdemo() { Button clickMe = new Button(); clickMe.Parent = this; clickMe.Text = "Click Me"; clickMe.Location = new Point( (ClientSize.Width - clickMe.Width) /2, (ClientSize.Height - clickMe.Height)/2); // an EventHandler delegate is assigned // to the button's Click event clickMe.Click += new EventHandler(OnClickMeClicked); // our custom "Startdelegate" delegate is assigned // to our custom "StartEvent" event. StartEvent += new Startdelegate(OnStartEvent); // fire our custom event StartEvent(); } // this method is called when the "clickMe" button is pressed public void OnClickMeClicked(object sender, EventArgs ea) { MessageBox.Show("You Clicked My Button!"); } // this method is called when the "StartEvent" Event is fired public void OnStartEvent() { MessageBox.Show("I Just Started!"); } static void Main(string[] args) { Application.Run(new Eventdemo()); } } [/code] And this from :[url]http://www.codeguru.com/csharp/csharp/cs\_delegates/eventhandling/\[/url\] [code] using System; //Step 1 Create delegate object public delegate void MyHandler1(object sender,MyEventArgs e); public delegate void MyHandler2(object sender,MyEventArgs e); //Step 2 Create event handler methods class A{ public const string m_id="Class A"; public void OnHandler1(object sender,MyEventArgs e){ Console.WriteLine("I am in OnHandler1 and MyEventArgs is {0}", e.m_id); } public void OnHandler2(object sender,MyEventArgs e){ Console.WriteLine("I am in OnHandler2 and MyEventArgs is {0}", e.m_id); } //Step 3 create delegates, plug in the handler and register // with the object that will fire the events public A(B b){ MyHandler1 d1=new MyHandler1(OnHandler1); MyHandler2 d2=new MyHandler2(OnHandler2); b.Event1 +=d1; b.Event2 +=d2; } } //Step 4 Calls the encapsulated methods through the // delegates (fires events) class B{ public event MyHandler1 Ev
-
Event,ClickHello I want to change this method public void Onclickadd() { int result = int.Parse(num1.Text) + int.Parse(num2.Text); MessageBox.Show(result.ToString()); } So that it can be used by predefined "Click" event. How?
-
PHP IDEHello friends I want to build a PHP IDE that anyone can write farsi or arabic easily as in frontpage or MS word, I want o use C# for this, what is the start point in order to build this IDE? Which things I must learn? Any one has idea about this subject?
-
Event,ClickHello frineds in this code I wanted when I add 2 nums,the result be shown in another massagebox(plus in textbox in form) I wanted to use predefined "Click" Please guide me. namespace calculate { public delegate void Startdelegate(); public delegate void addnum(); public partial class tamrin : Form { // custom event public event Startdelegate StartEvent; private Form2 Form2; public tamrin() { InitializeComponent(); this.Load += new System.EventHandler(this.Form1_Load); StartEvent += new Startdelegate(OnStartEvent); StartEvent(); } button2.Click += new EventHandler(OnClickadd); private void button1_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) / int.Parse(num2.Text); MessageBox.Show(result.ToString()); } private void button2_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) + int.Parse(num2.Text); TextBox3.Text = result.ToString(); } private void button3_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) * int.Parse(num2.Text); MessageBox.Show(result.ToString()); } public void OnStartEvent() { Form2 = new Form2(); Form2.Show(); } public void Form1_Load() { Form3 = new Form3(); Form3.Show(); } public void Onclickadd() { int result = int.Parse(num1.Text) + int.Parse(num2.Text); MessageBox.Show(result.ToString()); } } }
-
Multicast DelegationHello I read this from Professional C#,Wrox: "However, it is possible for a delegate to wrap more than one method. Such a delegate is known as a multicast delegate. If a multicast delegate is called, it will successively call each method in order." It is also said in that book: "If you are using multicast delegates, you should be aware that the order in which methods chained to the same delegate will be called is formally undefined. You should, therefore, avoid writing code that relies on such methods being called in any particular order. " Can methods in delegation run in special order?
-
SOAP,DatabaseHello friends I want to build a relation between 2 database by SOAP. The scenario is ,If one user input data in database A,Database B must beh updated automatically. Site A is by ASP.NET ,Site 2 is by PHP Mysql... But I have no Idea How to do that, Please guide, Thanks in advance.
-
EventHello friends namespace calculate { public delegate void Startdelegate(); public partial class Form1 : Form { // custom event public event Startdelegate StartEvent; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) / int.Parse(num2.Text); MessageBox.Show(result.ToString()); } private void button2_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) + int.Parse(num2.Text); TextBox3.Text = result.ToString(); } private void button3_Click(object sender, EventArgs e) { int result = int.Parse(num1.Text) * int.Parse(num2.Text); MessageBox.Show(result.ToString()); } // our custom "Startdelegate" delegate is assigned // to our custom "StartEvent" event. StartEvent += new Startdelegate(OnStartEvent); public void OnStartEvent() { MessageBox.Show("I Just Started!"); } I want when the for calculation be open,Another window will be open with this maassage : " It is started" I want to do this by delegation... GOOD LUCK!
-
C# database projectHello friends! I want to see source code of a simple accountancy or inventory software(that is written by C#.NET), Do you know how can I find that? Thanks
-
Picture process in C#Hello friends Happy new year! There is a project that is needed to match signature of different person,Is there any component for C# that can do it?(If you recomend a free one,It is better!) Thanks!
-
Gmail & AJAXHello Could you show me the AJAX code that Gmail use? Thanks, GOOD LUCK!
-
Gmail & AJAXHello my firend How? How Gmail use AJAX to do something like that,I know something about AJAX,But I want to know How GMAIL use that? I saw something about google suggestion ,But I want to know about Gmail.Do you know any tutorial that shows how gmail does that? GOOD LUCK! -- modified at 0:44 Monday 18th September, 2006
-
Gmail & AJAXHello firends when I recieve new email from AJAX,Without any refresh it shows me I recieve new email and number of add one to number of email in inbox. I want to know how gmail do that? Is it by AJAX? When we use AJAX,User does something ,And after user did an action on interface ,then interface will change,But in this case it shows me without any refresh or without any action on interface,Please know me if you know any tutorial about this case.Do you AJAX code for that? I heard that Gmail uses a hidden iframe for its Ajax calls. Regardless, you can easily do auto-updating without any user interaction by setting a repeating callback (with setTimeout or similar) which polls the server for updates every X seconds. May someone give me code for these idea?(use settimeout and use Iframe) Thanks in advance
-
Huge file [modified]Hello first of all thanks for answer,So Fast! Look the problem is that these are huge file,Maybe 1G... The solution that you recommanded ,have problem of speed,I want a solution that read file faster. Thanks in advance
-
Huge file [modified]I want to read a very large files such az log files in IIS line by line with an especial format for each line (by c#),Which way or function do you recommand? -- modified at 11:37 Wednesday 19th July, 2006
-
Database on a network,Hello Sean Thanks for your guidance,But link doesn't work......... GOOD LUCK!