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 955191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:20:28+00:00 2026-05-16T00:20:28+00:00

In VB6 you have the ability to name your controls with an index. i.e.:

  • 0

In VB6 you have the ability to name your controls with an index.

i.e.: cmdStartInterval(1), cmdStartInterval(2), … .

Then you have a method head like this:

Private Sub cmdStartInterval_Click(Index As Integer)
...
End Sub

Is this also possible in a similary way in C#?

  • 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-16T00:20:28+00:00Added an answer on May 16, 2026 at 12:20 am

    In c# you can assign all buttons to 1 event handle

    protected void cmdButtons_Click(object sender, System.EventArgs e)
    

    when a button clicked this event was called and instance of this button passed to this event by sender parameter.

    Note (added later)
    While the above is a valid answer to a subset of the problem and an excellent workaround if the index itself is not needed, it should be noted that it is not an equivalent of indexed controls, as the title suggests, but an alternative. VB6’s indexed controls are technically arrays. Hence an equivalent would be an array in C# which can only be reached through code, not via the designer.

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

Sidebar

Related Questions

I have a VB6 class with a method which raises an error: Public Sub
I have a VB6 application that needs to update it's self. For this purpose,
VB6 classes have no parameterized constructors. What solution have you chosen for this? Using
I have a VB6 Standard EXE with no embedded type library. I'd like to
I have vb6 project that uses Refresh2 method of WebBrowser. How I can access
I have VB6 application that uses Navigate2 method of WebBrowser control. .Net version of
VB6 forms have a little picture in the upper-left that controls the menu for
I have to modify a VB6 app and am repeatedly beating my head against
I have VB6 application , I want to put some good error handling finction
I have a vb6 form with an ocx control on it. The ocx control

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.