Reputation: 5705
I used a button click event to call the dialog box as follows:
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 ...
}
}
how can I specify the icon image from a given folder to show on the dialogbox ?
Upvotes: 0
Views: 1110
Reputation: 4340
try:
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 ...
}
}
But it will change the image inside the dialog box, (if you want to change the icon of the dialog caption - i think it is not possible without modifying BetterDialog
code)
Upvotes: 1