Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dafsd

Posted on 2015-02-12
2
Medium Priority
?
54 Views
Last Modified: 2015-02-13
I'm writing my first  C#  program in Microsoft Visual C# 2010.  From "New Project" window I select "Visual C#", Windows Forms Application.  I create two buttons.  When I double-click first button, it opens up source code window.  I write one line of source code which also propagates to button 2's source code.  

Why ?

I want both buttons to be independent of each other.  Adding code for button 1 shouldn't appear in button 2's source code.
0
Comment
Question by:naseeam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 2000 total points
ID: 40606949
Are you expecting a separate source file for each button? Usually, there's just one source file per form and the code for each widget, button, etc will appear in that source file, regardless of which control you click on to visit the source file. Code that you add specific for a button should not be getting duplicated to the other button.

You want to post a code sample to show what you're seeing?
0
 
LVL 1

Author Closing Comment

by:naseeam
ID: 40607903
Thank you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question