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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:15:26+00:00 2026-06-10T18:15:26+00:00

I created a program to over UltraVNC to easier manage some computers since their

  • 0

I created a program to over UltraVNC to easier manage some computers since their aren’t many (<25) each PC has it’s own button and according to a toggle toolstrip I can view or manage that computer among other things.

I already have a version functioning just fine but I want to add some features refine my old code. All 15 button that I currently use to represent computer call the same function. I was wondering is there a better way to that this:

private void PC1_Click(object sender, EventArgs e)
{
    Viewer("01", activeButton);
}

private void PC2_Click(object sender, EventArgs e)
{
    Viewer("02", activeButton);
}
private void PC3_Click(object sender, EventArgs e)
{
    Viewer("03", activeButton);
}

private void PC4_Click(object sender, EventArgs e)
{
    Viewer("04", activeButton);
}

private void PC5_Click(object sender, EventArgs e)
{
    Viewer("05", activeButton);
}

I have been searching for awhile but can’t find a thing. I just can’t think what it is I need. The buttons are already created but I can’t find a way to add this function call to it, I only seem to find how to create a button on startup.

  • 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-06-10T18:15:27+00:00Added an answer on June 10, 2026 at 6:15 pm

    You can simply subscribe the same method as each click handler.

    For example, in the Designer, you can go to the properties for a button, select the events tab, click on the Click button drop-down and select an existing method (e.g. PC1_Click for the PC2 button). You don’t have to create a new handler (e.g. double-clicking the button).

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

Sidebar

Related Questions

I believe the word is recurse instead of 'start over.' I've created this program
I created a program that iterates over a bunch of files and invokes for
I'm trying to make a program in Visual C# that has my one created
In my C++ program, I want to be able to add some text over
My program was running fine, but I changed something and now it has over
A python program I created is IO bounded. The majority of the time (over
I created this program: #include <iostream> #include <fstream> using namespace std; int main ()
I created a program called test: #include<stdlib.h> #include<iostream> int main() { std::cout<<system(..\\add\\debug\\add.exe 4 8);
I created a program that more or less holds an array of strings as
I created a program in C++2011 that actually uses features of C++2011: mutex ,

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.