C#»ñÈ¡×Ö·û´®µÄ³¤¶È
C#»ñÈ¡×Ö·û´®µÄ³¤¶È
×÷Õߣºylclass À´Ô´£º²©¿ÍÔ° ·¢²¼Ê±¼ä£º2009-10-30 16:25 ÔĶÁ£º193 ´Î ÔÎÄÁ´½Ó [ÊÕ²Ø]
1¡¢ ʹÓÃg.MeasureString£¨£©»ñµÃ
ʹÓÃMeasureString²âÁ¿³öÀ´µÄ×Ö·û¿í¶È£¬×ÜÊDZÈʵ¼Ê¿í¶È´óһЩ£¬¶øÇÒËæ×Å×Ö·ûµÄ³¤¶ÈÔö´ó£¬Ã²ËÆʵ¼Ê¿í¶ÈºÍ²âÁ¿¿í¶ÈµÄ²î¾àÒ²Ô½À´Ô½´óÁË¡£²éÁËÒ»ÏÂMSDN£¬ÕÒµ½ÁËÏÂÃæÕâ¸öÀíÓÉ£º
MeasureString ·½·¨Ö¼ÔÚÓë¸ö±ð×Ö·û´®Ò»ÆðʹÓã¬ËüÔÚ×Ö·û´®Ç°ºó°üÀ¨ÉÙÁ¿¶îÍâµÄ¿Õ¸ñ¹©Í»³öµÄ±êÖ¾·ûºÅʹÓá£
string str;
str = "´ó";
Font f = new Font("SimSun", 7F, System.Drawing.FontStyle.Regular);
Graphics g = this.CreateGraphics();
//µ¥Î»Îªmm
g.PageUnit = GraphicsUnit.Millimeter;
SizeF sim = g.MeasureString(str, f);
2¡¢Ê¹ÓÃTextRenderer.MeasureText»ñµÃ£¬ÌṩʹÓÃÖ¸¶¨³ß´ç´´½¨Îı¾³õʼ±ß¿òʱ£¬Ê¹ÓÃÖ¸¶¨µÄÉ豸ÉÏÏÂÎÄ¡¢×ÖÌåºÍ¸ñʽ˵Ã÷Ëù»æÖƵÄÖ¸¶¨Îı¾µÄ³ß´ç£¨ÒÔÏñËØΪµ¥Î»£©¡£
private void MeasureText(PaintEventArgs e)
{
string str;
str = "´ó¼ÒºÃ";
Font f = new Font("SimSun", 7F, System.Drawing.FontStyle.Regular);
Size sif = TextRenderer.MeasureText(e.Graphics, str, f, new Size(0, 0), TextFormatFlags.NoPadding);
M
Ïà¹ØÎĵµ£º
Delphi7 µ÷Óà C#µÄWebservice ²»ÄÜ´«Èë²ÎÊý
½â¾ö°ì·¨£º
ÔÚDelphiµ¼ÈëWSDLºóÉú³ÉµÄµ¥ÔªµÄ×îºóÒ»ÐУ¬¼´initializationÀïµÄ³õʼ»¯¶Ë¿ÚµÄ´úÂëÖмÓÈë´úÂë
InvRegistry.RegisterInvokeOptions(TypeInfo(½Ó¿ÚÃû), ioDocument);
¼´¿É
......
public partial class shujuku_huanyuan : System.Web.UI.Page
{
SqlConnection conn = new SqlConnection(@"server=HUAZD-33\XXD33;uid=sa;pwd=111111;database=master;");
protected void Page_Load(object sender, EventArgs e)
&nbs ......
ÔÚASP.NetÒ»°ãµÄ³ÌÐò±àдÖУ¬ËùʹÓõÄÊý¾ÝÀïÃ棬ÈÕÆÚʱ¼äÊÇÒ»ÖÖÌØÊâµÄÊý¾ÝÀàÐÍ£¬Ò²ÊǾ³£±»Ê¹Óõġ£---µçÄԽ̳̼¼ÊõѧϰÍø
ÔÚVisual Basic.NETÖеÄÈÕÆÚʱ¼äÊý¾ÝÓÃÊýÖµµÄÊý¾ÝÀàÐͱ£´æ£¬¶øÇÒÓз¶Î§¡£
ÈÕÆڵķ¶Î§Êǹ«Ôª1Äê1ÔÂ1ÈÕ¡«¹«Ôª9999Äê1 2ÔÂ3 1ÈÕ£¬Ê±¼äµÄ·¶Î§ÊÇ00£º00£º00¡«23£º59£º59¡£ÉùÃ÷¸ñÊ½È ......
1¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿â
ÏÈÏÂÔغͰ²×°MySQLDriverCS£¬µØ
Ö·£º
http://sourceforge.net/projects/mysqldrivercs/
ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½
MySQLDriver.dll
£¬È»ºó½«
MySQLDriver.dll
Ìí¼ÓÒýÓõ½ÏîÄ¿ÖÐ
×¢£ºÎÒÏÂÔصÄÊÇ°æ±¾ÊÇ
MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
using
S ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
/// <summary>
/// Data ......