请高手帮忙,分不够可以在加!再线等!!! 如何在网页中画带有箭头的直线阿。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/wwei466/archive/2007/09/26/1801166.aspx Pen p = new Pen(Color.Black, 5); Graphics g = this.panelControl2.CreateGraphics(); p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; g.DrawLine(p, 10, 30, 200, 30); p.Dispose(); g.Dispose(); 是在文字下面还是图片中,文字下面用css加带箭头的图片来实现 存为html看看<HTML xmlns:v><HEAD><META http-equiv='Content-Type' content='text/html; charset=gb2312'><Meta name='Gemeratpr'><TITLE>网页中画箭头:</TITLE><style type="text/css">v\:*{behavior:url(#default#VML);} *{font-size:12px;color:;}</style></HEAD><BODY><v:line id=fyw5 style="Z-INDEX:1006;LEFT:450px;POSITION:absolute;TOP:203px" from="0,0" to="54pt,0" strokecolor="black" strokeweight="10pt"><v:Stroke startarrow="none" endarrow="block"></v:Stroke></v:line><table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="30" bgcolor="#D6D6D6" style="border:1px solid #f60; text-align:center;"><strong>网页中画箭头</strong></td> </tr></table></BODY></HTML> http://blog.csdn.net/wwei466/archive/2007/09/26/1801166.aspx 服务端可用 GDI+如果纯客户端可用 JS + VML 看什么样的应用场景,需要用什么技术实现css也可以做啊 有两种方法,一种是以float做参数的,一种是以int做参数的。 private void DrawTrigon(Graphics g,Pen pen,float x1,float x2,float y1,float y2,float arrowWidth,float ArrowLength) { pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; pen.CustomEndCap = new AdjustableArrowCap(arrowWidth, ArrowLength, true); //pen.StartCap = LineCap.Custom; //pen.EndCap = LineCap.Custom; g.DrawLine(pen, x1, x2, y1, y2); } private void DrawTrigon(Graphics g, Pen pen, float x1, float x2, float y1, float y2) { DrawTrigon(g, pen, x1, x2, y1, y2, 3, 4); } // private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * 3), (float)(linepen.Width * 4), true); g.DrawLine(linepen, new Point(x1, x2), new Point( y1,y2)); } private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2, float arrowWidth, float ArrowLength) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * arrowWidth), (float)(linepen.Width * ArrowLength), true); g.DrawLine(linepen, new Point( + x1, x2), new Point( y1, y2)); } <p><span>----------------------------------------------></span></p><hr width="80%" /> WebService用于AJAX 求助。。。 网站上传了一个flv视频文件,FTP上确实有,但是通过网址访问,提示系统找不到该文件,怎么个问题啊? EF框架下如何调用存储过程? 学习asp.net实战项目,用哪本用书比较好呢? 请问怎么从 .aspx 页面向 .asp 页面传递参数? 动态更改textbox控件的背景色时出现的小问题 字符串转换成int 数组的问题 如何重定向在新的一个页面打开呀??在线等 想请孟子E章,等高手帮我解决个疑惑!谢谢! 如何从 MOSS /WSS "发上意外错误"中恢复回来 急 三层模式,内容找不到
Graphics g = this.panelControl2.CreateGraphics(); p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
g.DrawLine(p, 10, 30, 200, 30);
p.Dispose();
g.Dispose();
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<Meta name='Gemeratpr'>
<TITLE>网页中画箭头:</TITLE>
<style type="text/css">
v\:*{behavior:url(#default#VML);}
*{font-size:12px;color:;}
</style>
</HEAD>
<BODY>
<v:line id=fyw5 style="Z-INDEX:1006;LEFT:450px;POSITION:absolute;TOP:203px" from="0,0" to="54pt,0" strokecolor="black" strokeweight="10pt">
<v:Stroke startarrow="none" endarrow="block">
</v:Stroke>
</v:line>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" bgcolor="#D6D6D6" style="border:1px solid #f60; text-align:center;"><strong>网页中画箭头</strong></td>
</tr>
</table>
</BODY>
</HTML>
如果纯客户端可用 JS + VML
css也可以做啊
有两种方法,一种是以float做参数的,一种是以int做参数的。 private void DrawTrigon(Graphics g,Pen pen,float x1,float x2,float y1,float y2,float arrowWidth,float ArrowLength)
{
pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
pen.CustomEndCap = new AdjustableArrowCap(arrowWidth, ArrowLength, true);
//pen.StartCap = LineCap.Custom;
//pen.EndCap = LineCap.Custom;
g.DrawLine(pen, x1, x2, y1, y2);
}
private void DrawTrigon(Graphics g, Pen pen, float x1, float x2, float y1, float y2)
{
DrawTrigon(g, pen, x1, x2, y1, y2, 3, 4);
}
//
private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * 3), (float)(linepen.Width * 4), true);
g.DrawLine(linepen, new Point(x1, x2), new Point( y1,y2));
}
private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2, float arrowWidth, float ArrowLength)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * arrowWidth), (float)(linepen.Width * ArrowLength), true);
g.DrawLine(linepen, new Point( + x1, x2), new Point( y1, y2));
}
<hr width="80%" />