用C#完成类似于OFFICE中查找/替换中的高级选项效果

private void btnAdvance_Click(object sender, EventArgs e)

{

if (!gbAdvance.Visible)

{

gbAdvance.Visible = true;

this.Height = ht + gbAdvance.Height;

btnAdvance.Text = "隐藏高级选项(&H)";

}

else

{

gbAdvance.Visible = false;

this.Height = ht;

btnAdvance.Text = "显示高级选项(&S)";

}

}

private void 窗体名称_Load(object sender, EventArgs e)

{

ht=gbContents.Height + panControls.Height+SystemInformation.CaptionHeight+SystemInformation.BorderSize.Height*2;

this.Height = ht;

}

完成效果如图所示:

用C#完成类似于OFFICE中查找/替换中的高级选项效果

用C#完成类似于OFFICE中查找/替换中的高级选项效果

你可能感兴趣的:(C++,c,C#,Office)