|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace CustomizedForms
{
public partial class Min_Max_Close : UserControl
{
public Min_Max_Close()
{
InitializeComponent();
cmdMin.VisibleChanged+=new EventHandler(cmdMin_VisibleChanged);
cmdMax.VisibleChanged += new EventHandler(cmdMin_VisibleChanged);
cmdClose.VisibleChanged += new EventHandler(cmdMin_VisibleChanged);
}
private void cmdMin_VisibleChanged(object sender, EventArgs e)
{
Button cmd = sender as Button;
if (cmd.Visible == false)
{
this.Width = this.Width - cmd.Width;
this.Location = new Point(this.Left + cmd.Width, this.Top);
// MessageBox.Show(this.Width.ToString());
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.