`

System.Drawing.Color的使用(转)

    博客分类:
  • C#
阅读更多
System.Drawing.Color color=Color.Red;


System.Drawing.Color color=Color.FromArgb(255,0,0); 


myGridView.BorderColor=Color.FromName("#DEBA84");
分享到:
评论
2 楼 kinglyhum 2010-10-07  
zhug 写道
请问Color里面有没有随机颜色?

没有现成的方法,可以先生成随机数,再生成颜色
1 楼 zhug 2010-10-02  
请问Color里面有没有随机颜色?

相关推荐

    由直线、曲线创建图形,using System.Drawing.Drawing2D;的应用例子,C#源代码 Point[]

    由直线、曲线创建图形,using System.Drawing.Drawing2D;的应用例子,C#源代码 Point[] points = { new Point(40, 60), new Point(50, 70), new Point(30, 90)}; GraphicsPath path =...

    .Net下利用反射遍历System.Drawing.Color

    .Net中的Color类是用来表示颜色的,比如某一个控件的BackColor,ForeColor等等,都是一个System.Drawing.Color结构类型。本小程序给出了遍历System.Drawing.Color中的所有类型,将他们输出到界面,利用反射机制,很...

    C#System.Drawing.Color的颜色对照表

    C#System.Drawing.Color的颜色对照表 有图有说明 转载自 http://www.cnblogs.com/xpvincent/archive/2012/12/17/2821665.html

    Chartlet.dll

    Color1 System.Drawing.Color Color2 System.Drawing.Color Color3 System.Drawing.Color TextureEnable System.Boolean Stroke FanG.StokeStyle Width System.Int32 ColorStyle FanG.Chartlet+ColorStyles ...

    c#遍历System.drawing.Color下面的所有颜色以及名称以查看

    c#遍历System.drawing.Color下面的所有颜色以及名称以查看,需要的朋友可以参考一下

    用paint方法渐变的窗口背景,using System.Drawing.Drawing2D的应用,C#源代码Graphics g=e.Graphics;

    用paint方法渐变的窗口背景,using System.Drawing.Drawing2D的应用,C#源代码Graphics g=e.Graphics; Color FColor=Color.Blue; Color TColor=Color.Yellow; Brush b =new LinearGradientBrush(this....

    将字符串转换成System.Drawing.Color类型的方法

    将字符串转换成System.Drawing.Color类型的方法,需要的朋友可以参考一下

    将HTML颜色代码转换为System.Drawing.Color(WinMobile应用程序)

    将HTML颜色代码转换为System.Drawing.Color(WinMobile应用程序)

    c#编写的计算器

    this.btn_9.FlatAppearance.MouseOverBackColor = System.Drawing.Color.WhiteSmoke; this.btn_9.Font = new System.Drawing.Font("黑体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit....

    C#+sql宿舍管理系统

    this.btClose.ForeColor = System.Drawing.Color.Black; this.btClose.Location = new System.Drawing.Point(168, 156); this.btClose.Name = "btClose"; this.btClose.Size = new System.Drawing.Size(75, 23);...

    C#课堂练习

    this.btnLogin.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); this.btnLogin.FlatAppearance.BorderSize = 0; this....

    NOTEBOOK记事本C#程序

    this.label3.ForeColor = System.Drawing.Color.RoyalBlue; this.label3.Location = new System.Drawing.Point(16, 224); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size...

    十六进制和RGB颜色互转

    return System.Drawing.Color.FromArgb(System.Int32.Parse(strHxColor.Substring(1, 2), System.Globalization.NumberStyles.AllowHexSpecifier), System.Int32.Parse(strHxColor.Substring(3, 2), System....

    图片水印 缩略图+裁剪(MyImageHelper)

    resultG.Clear(Color.White); //绘制缩略图 resultG.DrawImage(initImage, new System.Drawing.Rectangle(0, 0, side, side), new System.Drawing.Rectangle(0, 0, initWidth, initHeight), System.Drawing....

    C# 俄罗斯方块游戏

    using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Xml; using System.IO; using System.Security.Cryptography; using System.Text; using...

    vb.net中的碎片发生器

    Option Strict OnImports System.MathPublic Class MandelbrotForm Inherits System.Windows.Forms.Form#... 1 Return Color.FromArgb(clr, 0, 0) Case 256 To 256 * 2 - 1 Return Color.FromArgb(255, clr - 256, 0...

    js无刷新图片验证码

    System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.DarkRed, 1.2f, true);...

    vs 2005 c#关机源码

    this.button1.BackColor = System.Drawing.Color.Olive; this.button1.Location = new System.Drawing.Point(32, 80); this.button1.Name = "button1"; this.button1.TabIndex = 0; this.button1.Text =...

Global site tag (gtag.js) - Google Analytics