· 下面的例子通过重载Form1窗体的OnPaint()方法绘制GDI图形
Protected Overrides Sub onpaint(ByVal e As System.Windows.Forms.PaintEventArgs)
'/////////////绘制任意直线
Dim g As Graphics = e.Graphics
Dim mypen As Pen = New Pen(Color.Red, 2)
g.DrawLine(...
· using System;
using System.WinForms;
using System.Drawing;
public class CreateMyPanel : Form
{
Color[] color = new Color[]{
Color.AliceBlue,
Color.AntiqueWhite,
Color.Aqua,
Color.Aquamarine,
Color.Azure,
Color.Beige,
Color.Bisque,
Color.Bla...
· Tips and Tricks
Contents
Flicker free drawing in controls
Embedding bitmaps in your manifest
Creating type safe collections the quick way
Flicker free drawing in controls
You have just spent several days writing a beautiful looking custom control but are faced with one ...
· HOW TO: Update a Database from a DataSet Object Using Visual Basic .NET
This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice. No formal product support is available from Microso...
· 我在写的过程中发现了这个控件并不用 Paint 事件,所以只好直接截取 WndProc 函数了,很简单,是这样的:Public Class TextBoxBlue
Inherits TextBox Protected Overrides Sub WndProc(ByRef m As system.Windows.Forms.Message)
MyBase.WndProc(m)
Const WM_PAINT As Integer = &H...
· '发送端:
'By wgscd Dim sendsocket As New Net.Sockets.Socket(Net.Sockets.AddressFamily.InterNetwork, Net.Sockets.SocketType.Stream, Net.Sockets.ProtocolType.Tcp)'实例化socketDim ipendpiont As New Net.IPEndPoint(Net.IPAddress.Parse("127.0.0.1"), 8888) '建立终结点'Ope...