1. Custom Control with 2 Textboxes
Publicly define Int Sum = textbox1 + textbox2 values
2. A new Form and Add the Custrom Control created
A third Textbox which will take value from CustromControl.Sum
The Tricky issue is , Event Should Occur when ever the Textbox1 and Textbox2 values are changed in the Form . and Textbox 3 should get automatically updated.
can anyone who's done this help me with this ?? Its something I've tried using A delegates and events but its never getting invoked in the main form .
Any Help would be appreciated
Thanks
Loading
FroglegPosted Apr 18, 2011, 3:22 AM
http://www.cultiv.nl/blog/2010/3/16/convert-between-vs2008-and-2010-projects,-automatically
Mayur GujrathiPosted Apr 18, 2011, 1:26 AM
Sam HobbsPosted Apr 18, 2011, 12:23 AM
Vivek SamparaPosted Apr 17, 2011, 2:39 AM
So This custom control has 2 Text boxes. If there's any change of value in either of the textbox there should be an Event Triggered in the form we're using this custom control.
So Event For Textbox.TextChanged doesn't exist for custom Control, To trigger the main form. So i've used the code i've mentioned . So when event the textbox value is changed , the main form gets triggerd
Hope you understood now .
Sam HobbsPosted Apr 17, 2011, 2:08 AM
Beginners tend to talk in terms of projects. Experienced Windows developers don't. In this context, a project can be another application and therefore some kind of inter-process communication is necessary. That is not a typical Windows Forms thing and is very different from an intra-process solution. A project could be a class library which executes within a process and would not need inter-process communication.
Vivek SamparaPosted Apr 17, 2011, 1:44 AM
Frogleg , Thanks for you reply, It really helped me a lot but ,But I got it working in this method
Sam Hobbs, I put up the word as a challenge,
1. I've consulted a few very good .NET programmers and i dint find any results for that , so it would be something for the experts of C sharp corner can try.
2. Yes i my intend was to get the result as it would be very useful for me and others who are working on Custom Events and Delegates .
Thanks For the Reply Guys
--
And in the Form im using the custom Contol. I used this
this.newControl11.MyEvent += new NewControl1.TextBoxControl_TextChangedEventHandler(CustomNewChange);
Sam HobbsPosted Apr 16, 2011, 6:47 PM
I am not sure if you are saying that there is just one form or two forms. Is it one form with a UserControl and a textbox in it and the UserControl has two textboxes?
FroglegPosted Apr 15, 2011, 8:06 PM
Vivek SamparaPosted Apr 14, 2011, 6:49 AM
As you have used the object in the same object you dont have to make any delegates .
FroglegPosted Apr 14, 2011, 5:01 AM
Vivek SamparaPosted Apr 14, 2011, 2:05 AM
Vivek SamparaPosted Apr 13, 2011, 5:11 AM