1. MDI architecture is now really out-dated, and if you have the choice, I suggest you don't use it.
2. Putting any Control on the MDI Parent Form itself, except maybe a ToolStripMenu, is generally a bad idea.
3. Changing a Form's status from being an 'MdiChildForm to being "just another" Form on the Desktop is ... well ... unusual. This may be confusing to your end-users. You might consider, instead of an MDI Parent to Child relationship, using the 'Owner property of the secondary Form ... set it to the Main Form, instead. A Form which has an 'Owner is guaranteed to remain in front of its'Owner Form.
«To kill an error's as good a service, sometimes better than, establishing new truth or fact.» Charles Darwin in "Prospero's Precepts"
Combining the two would give you something like this:
using (MailMessage mail = new MailMessage())
mail.From = new MailAddress("firstname.lastname@example.org");
mail.Subject = "This is an email";
AlternateView plainView = AlternateView.CreateAlternateViewFromString("This is my plain text content, viewable by those clients that don't support html", null, "text/plain");
AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<p>Here is an embedded image: <img src=\"cid:myimage\"></p>", null, "text/html");
MemoryStream stream = new MemoryStream();
LinkedResource imageResource = new LinkedResource(stream, MediaTypeNames.Image.Jpeg);
imageResource.ContentId = "myimage";
SmtpClient smtp = new SmtpClient("127.0.0.1");
You just need to make sure that each embedded resource has a ContentId which is unique within the message, and refer to the resource within the view as cid:ContentId.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Last Visit: 31-Dec-99 19:00 Last Update: 29-Mar-15 7:33