Results 1 to 2 of 2

Thread: Raise custom event in form

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Raise custom event in form

    I have a form which contains an object :
    Code:
    public IDataItem _objCurrent
            {
                get
                {
                    return objCurrent;
                }
                set
                {
                    objCurrent = value;
                }
            }
    I also have a timer_tick event :
    Code:
    private void timer1_Tick(object sender, EventArgs e)
            {
                clsAPI lclsAPI = new clsAPI();
                lclsAPI.apiGetCurrent(this.objCurrent);
            }
    The cut down method in my clsAPI looks like this :
    Code:
    public AdapterTest.IDataItem apiGetCurrent(IDataItem current)
            {
        
                if (dItem == current)
                {
                    break;
                }
                else
                {
                    //RAISE EVENT IN FORM BUT HOW ?;
                }
                
            }
    Basically if the objects do NOT equal eachother I want to raise an event in the form to do something but the question is how.

    Parksie

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Raise custom event in form

    Code:
    raise EventName(arg1,arg2);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width