|
走近VB.Net(三) 源码详解—运用颜色的初步探讨

新建一个工程,加入以下控件
1. label控件:label1,label2,labred ,labblue,labgreen 2. picturebox控件:picturebox1 3. button控件:Button1 设置form1的opacity属性为80%,设置透明的窗体 在office中抓取一幅取色图片存为bmp格式,并设为picturebox1的backgroundimage,即背景图片 Option Strict Off ''''关闭 strict off Imports System.ComponentModel ''''引用族名 Imports System.Drawing ''''引用族名 Imports System.WinForms ''''引用族名 ''''下面的例程我将写出全部的族名与子类,是避免大家看得不明白,如果明白了意思,就可以使用基于省略的方式 Public Class Form1 Inherits System.WinForms.Form ''''从System.WinForms.Form类引用到form1 Public pixX, pixY As Integer ''''声明两个32位的变量,用public定义他在类中所有成员间共享 Public Apr As Boolean = False ''''声明两个32位的变量,用public定义他在类中所有成员间共享并初始化他的值为false Public Sub New() ''''新建一个窗体 MyBase.New() ''''调用 Form1 = Me ''''定义me关键字的当前值为form1 ''''This call is required by the Win Form Designer. InitializeComponent() ''''在这个下面写的代码等同于VB6的form_ load中所写的代码 Call me_load() ''''你可以写一个子过程,在这里调用他,当然你完全可以写成别的过程名如me_beginform ''''TODO: Add any initialization after the InitializeComponent() call End Sub ''''Form overrides dispose to clean up the component list. Public Overrides Sub Dispose() ''''在这个下面写的代码等同于VB6的form_ unload中所写的代码 MyBase.Dispose() ''''调用 components.Dispose() ''''unload组件 End Sub 下面一段#Region " Windows Form Designer generated code "是不必看的, 我全部写在这里是为了您可以直接粘贴运行 #Region " Windows Form Designer generated code " ''''Required by the Windows Form Designer Private components As System.ComponentModel.Container Private WithEvents Label2 As System.WinForms.Label Private WithEvents Lab4 As System.WinForms.Label Private WithEvents Lab3 As System.WinForms.Label Private WithEvents Lab2 As System.WinForms.Label Private WithEvents LBblue As System.WinForms.Label Private WithEvents LBgreen As System.WinForms.Label Private WithEvents LBred As System.WinForms.Label Private WithEvents Button1 As System.WinForms.Button Private WithEvents Label1 As System.WinForms.Label Private WithEvents PictureBox1 As System.WinForms.PictureBox Dim WithEvents Form1 As System.WinForms.Form ''''NOTE: The following procedure is required by the Windows Form Designer ''''It can be modified using the Windows Form Designer. ''''Do not modify it using the code editor. Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1)) Me.components = New System.ComponentModel.Container() Me.LBblue = New System.WinForms.Label() [1] [2] [3] [4] [5] 下一页 [常用软件]office2000FAQ(三) [常用软件]评测:Gmail Beta(三) [VB.NET程序]把握VB.NET中的流(Stream) (三) [Delphi程序]Integer GUID和Comb做主键的效率测试(Delphi+acce… [网页制作]DreamwaverMX与ASP.NET(三) [其他]让你的应用程序不再对数据库的改动“感冒”(三) [ORACLE]ORACLE SQL性能优化系列 (三) [ORACLE]Oracle & JSP 开发的小型信息管理系统 (三) 源代码… [MySql]MySQL入门学习 三
|