一聚教程网:一个值得你收藏的教程网站

热门教程

在RichTextBox控件加入图片

时间:2022-07-02 11:57:02 编辑:袖梨 来源:一聚教程网

using System;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace Khendys.Controls {
 #region Public Enums
 // Enum for possible RTF colors
 public enum RtfColor {
    Black, Maroon, Green, Olive, Navy, Purple, Teal, Gray, Silver,
    Red, Lime, Yellow, Blue, Fuchsia, Aqua, White
 }
 #endregion
 
 public class ExRichTextBox : System.Windows.Forms.RichTextBox {
    #region My Enums
    // Specifies the flags/options for the unmanaged call to the GDI+ method
    // Metafile.EmfToWmfBits().
    private enum EmfToWmfBitsFlags {
     // Use the default conversion
     EmfToWmfBitsFlagsDefault = 0x00000000,
     // Embedded the source of the EMF metafiel within the resulting WMF
     // metafile
     EmfToWmfBitsFlagsEmbedEmf = 0x00000001,
     // Place a 22-byte header in the resulting WMF file.  The header is
     // required for the metafile to be considered placeable.
     EmfToWmfBitsFlagsIncludePlaceable = 0x00000002,
     // Don't simulate clipping by using the XOR operator.

热门栏目