我使用按钮单击事件来调用对话框,如下所示:
private void btnDialog_Click(object sender, EventArgs e)
{
DialogResult result = BetterDialog.ShowDialog("Special Dialog", "large heading", "small explanation", null, "Ok", ***null***);
if (result == DialogResult.OK)
{
// Action to perform ...
}
}
如何指定给定文件夹中的图标图像以显示在对话框上?
答案 0 :(得分:1)
尝试:
private void btnDialog_Click(object sender, EventArgs e)
{
DialogResult result = BetterDialog.ShowDialog("Special Dialog", "large heading", "small explanation", null, "Ok", Image.FromFile(@"fullPath\FileName.ext"));
if (result == DialogResult.OK)
{
// Action to perform ...
}
}
但它会改变对话框内的图像,(如果你想改变对话框标题的图标 - 我认为没有修改BetterDialog
代码就不可能)