惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
The Cloudflare Blog
I
InfoQ
美团技术团队
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
L
LangChain Blog
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog

博客园 - 岳洋

关键词:vb.net 扑克 cards.dll 网上较好的提取链接的正则表达式 下载网页源代码的程序 一个读取网页源代码的小程序 file manager 0.1 panel的使用 用于学习鼠标作图的网页。 写文件时换行的问题[转载] by 東風耐候 - 岳洋 用旧方法文件读写 - 岳洋 - 博客园 Birthday Reminder Framework 1.1版本 Birthday Reminder (R Edition) ver1.0 build 050813正式发布! 050627ReciteDemo0.2 050626诗歌背诵程序demo 050615 B-A-M v1.0源代码 050615 Bact.-Anti-Med.ver1.0正式发布! 新建一个按钮至少需要做的事情…… 我决定不再和窗体设计器争生意了! 050614Bact.-Anti-Med.v0.3最新更新 按钮的突然消失!(小记一次编程失误)
circleliner阅读笔记
岳洋 · 2005-12-31 · via 博客园 - 岳洋

很久没有做过circleliner了,主要是不知道.net里面怎么画图。

Imports System.Windows.Forms
Imports System.Drawing

Public Class circle
    
Inherits UserControl


    
Public BackgroundColor As Color = Color.GreenYellow
    
Public InsideColor As Color = Color.Red
    
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)

        
Dim graphics As Graphics = e.Graphics
        
Dim penWidth As Integer = 1
        
Dim pen As Pen = New Pen(Color.Black, penWidth)
        
Dim fontHeight As Integer = 10
        
Dim font As Font = New Font("Arial", fontHeight)

        
Dim brush1 As SolidBrush = New SolidBrush(BackgroundColor)
        
Dim brush2 As SolidBrush = New SolidBrush(InsideColor)
        graphics.FillEllipse(brush1, 
00, Width, Height)
        graphics.FillEllipse(brush2, 
CInt((Width - penWidth) / 4), CInt((Height - penWidth) / 4), CInt((Width - penWidth) / 2), CInt((Height - penWidth) / 2))
        
Dim textBrush As SolidBrush = New SolidBrush(Color.Black)

        graphics.DrawEllipse(pen, 
CInt(penWidth / 2), CInt(penWidth / 2), Width - penWidth, Height - penWidth)
        

        
'graphics.DrawString(Text, font, textBrush, penWidth, _Height / 2 - fontHeight)
    End Sub

End Class


http://aowind.cnblogs.com/archive/2005/03/11/116696.html
现在尝试新建控件,按照轻剑傲风的说法,继承usercontrol类,这里搞一个class circle.
system.windows.drawing.graphics.DrawEllipse

pen
Pen 对象,它确定椭圆的颜色、宽度和样式。
x
定义椭圆的边框的左上角的 x 坐标。
y
定义椭圆的边框的左上角的 y 坐标。
width
定义椭圆的边框的宽度。
height
定义椭圆的边框的高度。