当前位置:编程学习 > asp >>

自定义控件--图片按钮

 

图片按钮:

思路:很简单,就是在一个picturebox控件上放置一个button控件,然后将这个button添加进picturebox上(确保先拖拽picturebox,后拖拽button),设置这个button的背景色(这个时候是相对于picturebox)为透明。

 

Imports System.ComponentModel

Public Class picturebutton

    Inherits System.Windows.Forms.UserControl

 

#Region " Windows 窗体设计器生成的代码 "

 

    UserControl 重写 dispose 以清理组件列表。

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

        If disposing Then

            If Not (components Is Nothing) Then

                components.Dispose()

补充:Web开发 , ASP.Net ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,