最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
在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.
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.