Tuesday, April 8, 2014

How to Create Button Visible True or False in Windows Form Using C# with asp.net visual studio




Here we can see this one button only. But there is two button. Like button and unlike button .When like button click then the unlike button will show. And when unlike button clicked then the like button will show .Like as facebook like and unlike button .By Syed Maftahur Rahman Sohel.

The Graphical View Are:


The Code:
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 Visible_True_False
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void unlikeButton_Click(object sender, EventArgs e)
        {
            unlikeButton.Visible = false;
            likeButton.Visible = true;
        }

        private void likeButton_Click(object sender, EventArgs e)
        {
            likeButton.Visible = false;
            unlikeButton.Visible = true;
        }
    }
}


1 comment: