0

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 ?

Sami-L
  • 5,553
  • 18
  • 59
  • 87

1 Answers1

1

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)

eyossi
  • 4,230
  • 22
  • 20