none
using custom control in windows form.............. RRS feed

  • General discussion

  • Hello evertbody,
    I have made a custom conrol named "BtnSave" for windows application in VS2005. I created to properties named "table" and "column" for this button which show in which table and in which column the data is to be saved in datasourse. I have coded in the click event of the button to save the reocrd.

    When i use this button in my windows form, i want to validate the input before click event of the control. As per my knowledge i have to create a new class and inherite the BtnSave class and override the click event.

    But my problem is when i drop the BtnSave in the windows form, its object is created in the form class(this class inherits the form class). Where should i create a new class to inherite the BtnSave class and to override the click event? How i can access the control object in this class??


    Monday, October 25, 2010 3:51 AM

All replies