转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> VB.NET程序 >> 正文
走近VB.Net(三) 源码详解—运用颜色的初步探讨         ★★★★

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

作者:闵涛 文章来源:闵涛的学习笔记 点击数:3993 更新时间:2009/4/23 19:01:11

 

走近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入门学习 三  
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台