当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: using System;using System.Collec
 

 

    摘要: 当我们的软件需要各种饼状图和柱状图来表示数据时,我们或许会想到用offices中的图形控件或是第三方控件,但现在的第三方控件大都需要注册,有些免费的控件会有开发商的标记等。而对于使用offices的图形控件来说,并不能在程序中得于很好控制,其使用的简易程度也较低,所以在这我给出在c#中使用gdi+实现饼状图和柱状图跟数据库联接显示数据的方法。using system; using system.......
 ·[asp.net 教程] 二. web forms     »显示摘要«
    摘要:1. 服务器端处理虽然form.html能够通过post或者get方法产生回发,但是它仍然不能够处理用户输入,仍然是一个静态页面,现在我们需要在服务器端处理用户输入及回发。在服务器端处理用户输入有很多方式,因为本文是asp.net教程,故只谈asp.net。asp.net使用web form来描述web页面,通过面向对象的编程方式,配合.net framework,使web应用程序设计变得更简单,......


在RichTextBox控件加入图片

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;

 #region public enums 【程序编程相关:(原创)解密JScript.Encode

namespace khendys.controls { 【推荐阅读:昨日关注:C-omega vs ADO.

 #endregion 【扩展信息:C#教学经验谈(2):会跑的按钮

 // enum for possible rtf colors public enum rtfcolor {  black, maroon, green, olive, navy, purple, teal, gray, silver,  red, lime, yellow, blue, fuchsia, aqua, white }

  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,

   // dont simulate clipping by using the xor operator.   emftowmfbitsflagsnoxorclip = 0x00000004  };

  #endregion

  #region my structs

  // definitions for colors in an rtf document  private struct rtfcolordef {   public const string black = @"\red0\green0\blue0";   public const string maroon = @"\red128\green0\blue0";   public const string green = @"\red0\green128\blue0";   public const string olive = @"\red128\green128\blue0";   public const string navy = @"\red0\green0\blue128";   public const string purple = @"\red128\green0\blue128";   public const string teal = @"\red0\green128\blue128";   public const string gray = @"\red128\green128\blue128";   public const string silver = @"\red192\green192\blue192";   public const string red = @"\red255\green0\blue0";   public const string lime = @"\red0\green255\blue0";   public const string yellow = @"\red255\green255\blue0";   public const string blue = @"\red0\green0\blue255";   public const string fuchsia = @"\red255\green0\blue255";   public const string aqua = @"\red0\green255\blue255";   public const string white = @"\red255\green255\blue255";  }

  // control words for rtf font families  private struct rtffontfamilydef {   public const string unknown = @"\fnil";   public const string roman = @"\froman";   public const string swiss = @"\fswiss";   public const string modern = @"\fmodern";   public const string script = @"\fscript";   public const string decor = @"\fdecor";   public const string technical = @"\ftech";   public const string bidirect = @"\fbidi";  }

  #endregion

  #region my constants

  // not used in this application.  descriptions can be found with documentation  // of windows gdi function setmapmode  private const int mm_text = 1;  private const int mm_lometric = 2;  private const int mm_himetric = 3;  private const int mm_loenglish = 4;  private const int mm_hienglish = 5;  private const int mm_twips = 6;

  // ensures that the metafile maintains a 1:1 aspect ratio  private const int mm_isotropic = 7;

  // allows the x-coordinates and y-coordinates of the metafile to be adjusted  // independently  private const int mm_anisotropic = 8;

  // represents an unknown font family  private const string ff_unknown = "unknown";

  // the number of hundredths of millimeters (0.01 mm) in an inch  // for more information, see getimageprefix() method.  private const int hmm_per_inch = 2540;

  // the number of twips in an inch  // for more information, see getimageprefix() method.  private const int twips_per_inch = 1440;

  #endregion


...   下一页
 ·vb 从零开始编外挂(十二)     »显示摘要«
    摘要:--------------------------------------------------------------------------------------------------------------------------------------------------------vb实现指针访问!dll的访问---------------------------------......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE