开发者

How to display image in FreeTextBox & Label?

Is it possible to display an image in a FreeTextBox? If yes, how can I do this?

Thank you in advance!

EDIT:

I want to load images from the attachment of an EmailMessage and display it in a FreeTextBox & Label.

EDIT 2:

This is the code I use:

        FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox开发者_StackOverflow,
            new ItemView(100));
        foreach (EmailMessage item in findResults.Items)
        {
            item.Load();
            if (!list.Contains(item.Id.UniqueId))
            {
                DataRow dr = dt.NewRow();
                dr["OutlookID"] = item.Id.UniqueId;
                dr["Onderwerp"] = item.Subject;
                dr["Omschrijving"] = item.Body + item.Attachments;
                dr["Meldingsdatum"] = item.DateTimeSent;
                dr["Melder"] = ad.GetLoginName(item.Sender.Name);
                dt.Rows.Add(dr);

                string s = System.Text.Encoding.UTF8.GetString(item.MimeContent.Content);

                FreeTextBox1.Text += s;

            }


same as displaying a image using html -

<img src="...."/>

can u post a sample that u have tried


You'll want to do something like :

string s = System.Text.Encoding.UTF8.GetString(mime.Content);
FreeTextBox1.Text = s;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜