Click here to Skip to main content
15,902,275 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

}



private void btnOne_Click(object sender, EventArgs e)
{

txtBoxTwo.Text = "Hello!";

}

private void btnTwo_Click(object sender, EventArgs e)
{

txtBoxTwo.Text = "Hello!" + " " + txtBoxOne.Text;
txtBoxOne.Text = "";
}

private void btnReset_Click(object sender, EventArgs e)
{

txtBoxOne.Text = "";
txtBoxTwo.Text = "";
}

private void txtBoxOne_TextChanged(object sender, EventArgs e)
{




}
}
}
Posted
Comments
VR Karthikeyan 2-Feb-16 23:53pm    
Do you want to show the btnReset button when btnOne button got a click?
Member 12304035 3-Feb-16 9:56am    
Yes, when the program starts I would like to have the btnReset button (not Visible) until the btnOne is clicked. Not sure what code to use and where to put the code into my existing code for it to work correctly
Sergey Alexandrovich Kryukov 3-Feb-16 0:08am    
What's wrong with just reading original MSDN documentation?
—SA
Member 12304035 3-Feb-16 17:51pm    
Its not giving me the answer I'm looking for.

Thanks
Sergey Alexandrovich Kryukov 3-Feb-16 18:43pm    
You are welcome. But then what's the problem?
—SA

1 solution

This is the property you use to control visibility: Control.Visible Property (System.Windows.Forms)[^].

It looks like you already know how to handle button clicks. If you need to handle some other events, such as depressing a button (it's not 100% clear what you want to achieve), please clarify.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900