Results 1 to 3 of 3

Thread: pass array to a control event

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    pass array to a control event

    Can someone please have a look and help me figure this out. Thanks in advance for any help.
    I need to access an array inside a control event.
    I changed the valuechanged event declaration for a trackbar to:

    private void trbXMin_ValueChanged(object sender, EventArgs e, double [,] arrOrig)

    but now I get this error:
    Error 1 No overload for 'trbXMin_ValueChanged' matches delegate 'System.EventHandler' C:\Documents and Settings\Mark\My Documents\Visual Studio 2005\Projects\Visualizer\Visualizer\frmMain.Designer.cs 96 42 Visualizer


    highlighting this line:
    this.trbXMin.ValueChanged += new System.EventHandler(this.trbXMin_ValueChanged);

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Re: pass array to a control event

    I just realized how absurd my question was

    I still need access to the array from within the event though.

    What is the C# equivalent of a VB6 public array?

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Re: pass array to a control event

    Got it ... just needed to exapand the decl scope.

    sorry for the lame questions ... trying to learn C# is kinda tough for a VB dinosaur ... lol

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