登录
首页 » C# » c#实现画线

c#实现画线

于 2023-08-29 发布 文件大小:44.08 kB
0 151
下载积分: 2 下载次数: 1

代码说明:

实现c#画直线,设定x.y的起始和终点坐标画直线,可以设定线粗和线的颜色,很实用

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • HideProcess_forC
    XP隐藏进程C代码,直接调用即可。。。。。。。。。。。。。。(XP hidden process C code, you can call directly.)
    2009-03-30 13:51:40下载
    积分:1
  • LED2
    这个是简单的led流水程序,实现流水的方式不一样啊(This is a simple procedure led water, not the same as the way to achieve water ah)
    2010-01-11 19:15:19下载
    积分:1
  • Snow
    调用API 桌面飘雪,圣诞雪花、、、、、、、、、、、、、、、、、、、、、、、
    2013-11-09 20:27:40下载
    积分:1
  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • dnwet
    自己写的matlab小程序,用于解线性方程。可以参考下(Their own small programs written in matlab for solving equations. Can refer to)
    2011-09-27 10:15:25下载
    积分:1
  • dtlvbo
    零相位带通滤波源代码,可以对信号进行滤波处理提高信噪比.(Zero-phase band-pass filtering the source code, you can filter the signal-noise ratio improve treatment.)
    2021-03-26 17:09:13下载
    积分:1
  • ECC
    C语言,大素数域上的椭圆曲线加密解密算法(C language, the domain of large prime numbers on the elliptic curve encryption and decryption algorithm)
    2021-04-18 14:08:52下载
    积分:1
  • 4
    说明:  MATLAB程序, 半参数线性回归模型的最小二乘核估计 半参数线性回归模型的最小二乘正交序列估计。(MATLAB program, semi-parametric linear regression model of least squares kernel estimation Semiparametric least squares linear regression model orthogonal sequence estimation.)
    2009-08-24 10:00:21下载
    积分:1
  • 矢量编程潮流及最优潮流数据文件
    IEEE4,14,30,57,118,300总线matlab代码(IEEE4,14,30,57118300 bus matlab code)
    2020-12-20 08:49:09下载
    积分:1
  • CANopen_master
    基于stm32的设备移植canfestival。利用的stm32f1 提过给大家学习
    2022-03-28 16:31:51下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载