Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 616877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:22:26+00:00 2026-05-13T18:22:26+00:00

I have this code: this.form.Resize += new EventHandler(form_Resize); But I want to assign some

  • 0

I have this code:

this.form.Resize += new EventHandler(form_Resize);

But I want to assign some objects for later access in the form_Resize event, how can I do that?

and do I access the data in the EventArgs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:22:26+00:00Added an answer on May 13, 2026 at 6:22 pm

    You cannot “assign additional data” to a delegate, but you can create a parameterized version of the form_Resize method and then use lambda expressions (in C# 3+) or anonymous delegates (C# 2+) to specify the additional data when attaching the handler. One way to write this is following:

    void form_Resize(object sender, EventArgs e, Data additional) {
      // 'additional' contains whatever you specified when attaching handler
    }
    
    this.form.Resize += (s, e) => form_Resize(s, e, yourAdditionalData);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some images in a SQL Server database. I want to display them
I have a form that I would like to draw a custom title bar
I have a dialog box that displays a dynamic-sized form. I currently get the
I realize this question has been asked several times in several different forms ,
How to draw a circle on a form that covers the whole working area?
UPDATE: See the comment by systempuntoout . The form was missing the submit button.
This is a follow up question to my previous question . I am trying
I'm trying to update a website for a friend on the Joomla CMS. A
I'll describe my overall goal in case the question I asked isn't in the
In Window Forms, I've put a pictureBox as a background image. Then, I've made

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.