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

  • Home
  • SEARCH
  • 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 139167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:23:11+00:00 2026-05-11T07:23:11+00:00

Visual Studio and SharpDevelop do not both set up delegates to handle events in

  • 0

Visual Studio and SharpDevelop do not both set up delegates to handle events in the same way. The way they are set up is a little bit different. This makes it difficult to use VS in one place and #Develop in another (on the same project).

For Example, in VB, Visual Studio does the following:

Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click     Me.DialogResult = System.Windows.Forms.DialogResult.OK     Me.Close() End Sub 

And …

Friend WithEvents OK_Button As System.Windows.Forms.Button 

So that the control is declared, not only with a different scope (this can be a problem also, but not the topic of this post) but with a withevents. The event handler is then assigned to it by a handles clause.

in #Develop, it is done like this …

Sub OK_ButtonClick(sender As Object, e As EventArgs)  End Sub 

and …

Private button1 As System.Windows.Forms.Button 

Then, in the InitializeComponent method

AddHandler Me.button1.Click, AddressOf Me.OK_ButtonClick 

The most annoying thing about this, is even if it is done one way, the other ide will redo it, having duplicate declarations, and of course, compile time errors.

Does anyone know of a way around this, some way to customize the default handlers? even if it is just some way that they can be turned off, so it can just be typed manually?

  • 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. 2026-05-11T07:23:12+00:00Added an answer on May 11, 2026 at 7:23 am

    take them out of the .designer and wire them up manually in the constructor in the code behind. the .designer is regenerated by the designer of whatever tool you use

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 171k
  • Answers 171k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can control the keyboard and the mouse with python… May 12, 2026 at 2:19 pm
  • Editorial Team
    Editorial Team added an answer select a.id, t1.column_1, t2.column_2 from ( select id from t1… May 12, 2026 at 2:19 pm
  • Editorial Team
    Editorial Team added an answer The number one piece of advice you'll hear when dealing… May 12, 2026 at 2:19 pm

Related Questions

I want to test ASP.NET applications to get the feel for the MVC extension
We use the DesignSurface and all that good IDesignerHost goodness in our own designer.
I'm into creating a simple contact management application to test how WPF works with
EDIT: This post was originally specific to ASP.NET, but after thinking about it I'm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.